CommandAPI 8.8.0
An API for the command UI introduced in Minecraft 1.13
dev.jorel.commandapi.arguments.EnvironmentArgument Class Reference

An argument that represents the Bukkit Environment object. More...

+ Inheritance diagram for dev.jorel.commandapi.arguments.EnvironmentArgument:

Public Member Functions

 EnvironmentArgument (String nodeName)
 An Environment argument. More...
 
Class< Environment > getPrimitiveType ()
 
CommandAPIArgumentType getArgumentType ()
 
final Argument< T > replaceSafeSuggestions (SafeSuggestions< S > suggestions)
 Replaces the suggestions with a safe SafeSuggestions object. More...
 
final Argument< T > replaceWithSafeSuggestions (Function< SuggestionInfo, S[]> suggestions)
 Replaces the suggestions of this argument with an array of suggestions. More...
 
final Argument< T > replaceWithSafeSuggestionsT (Function< SuggestionInfo, Tooltip< S >[]> suggestions)
 Replaces the suggestions of this argument with an array of suggestions. More...
 
final Argument< T > includeSafeSuggestions (SafeSuggestions< S > suggestions)
 Includes the suggestions provided with the existing suggestions for this argument. More...
 
final Argument< T > includeWithSafeSuggestions (Function< SuggestionInfo, S[]> suggestions)
 Include suggestions to add to the list of default suggestions represented by this argument. More...
 
final Argument< T > includeWithSafeSuggestionsT (Function< SuggestionInfo, Tooltip< S >[]> suggestions)
 Include suggestions to add to the list of default suggestions represented by this argument. More...
 

Detailed Description

An argument that represents the Bukkit Environment object.

Deprecated:
Use WorldArgument instead.

Constructor & Destructor Documentation

◆ EnvironmentArgument()

dev.jorel.commandapi.arguments.EnvironmentArgument.EnvironmentArgument ( String  nodeName)

An Environment argument.

Represents Bukkit's Environment object

Parameters
nodeNamethe name of the node for this argument
Deprecated:
Use WorldArgument#WorldArgument(String) instead.

Member Function Documentation

◆ includeSafeSuggestions()

final Argument< T > dev.jorel.commandapi.arguments.SafeOverrideableArgument< T, S >.includeSafeSuggestions ( SafeSuggestions< S >  suggestions)
inherited

Includes the suggestions provided with the existing suggestions for this argument.

Use the static methods in SafeSuggestions to create safe suggestions.

Parameters
suggestionsThe safe suggestions to use
Returns
the current argument

◆ includeWithSafeSuggestions()

final Argument< T > dev.jorel.commandapi.arguments.SafeOverrideableArgument< T, S >.includeWithSafeSuggestions ( Function< SuggestionInfo, S[]>  suggestions)
inherited

Include suggestions to add to the list of default suggestions represented by this argument.

Parameters
suggestionsa function that takes in SuggestionInfo which includes information about the current state at the time the suggestions are run and returns a S array of suggestions to add, where S is your custom type
Returns
the current argument
Deprecated:
use includeSafeSuggestions(SafeSuggestions)

◆ includeWithSafeSuggestionsT()

final Argument< T > dev.jorel.commandapi.arguments.SafeOverrideableArgument< T, S >.includeWithSafeSuggestionsT ( Function< SuggestionInfo, Tooltip< S >[]>  suggestions)
inherited

Include suggestions to add to the list of default suggestions represented by this argument.

Parameters
suggestionsa function that takes in SuggestionInfo which includes information about the current state at the time the suggestions are run and returns a Tooltip array of suggestions to add, parameterized over S where S is your custom type
Returns
the current argument
Deprecated:
use includeSafeSuggestions(SafeSuggestions)

◆ replaceSafeSuggestions()

final Argument< T > dev.jorel.commandapi.arguments.SafeOverrideableArgument< T, S >.replaceSafeSuggestions ( SafeSuggestions< S >  suggestions)
inherited

Replaces the suggestions with a safe SafeSuggestions object.

Use the static methods in SafeSuggestions to create safe suggestions.

Parameters
suggestionsThe safe suggestions to use
Returns
the current argument

◆ replaceWithSafeSuggestions()

final Argument< T > dev.jorel.commandapi.arguments.SafeOverrideableArgument< T, S >.replaceWithSafeSuggestions ( Function< SuggestionInfo, S[]>  suggestions)
inherited

Replaces the suggestions of this argument with an array of suggestions.

Parameters
suggestionsa function that takes in SuggestionInfo and returns a S array of suggestions, where S is your custom type
Returns
the current argument
Deprecated:
use replaceSafeSuggestions(SafeSuggestions)

◆ replaceWithSafeSuggestionsT()

final Argument< T > dev.jorel.commandapi.arguments.SafeOverrideableArgument< T, S >.replaceWithSafeSuggestionsT ( Function< SuggestionInfo, Tooltip< S >[]>  suggestions)
inherited

Replaces the suggestions of this argument with an array of suggestions.

Parameters
suggestionsa function that takes in SuggestionInfo and returns a Tooltip array of suggestions, parameterized over S where S is your custom type
Returns
the current argument
Deprecated:
use replaceSafeSuggestions(SafeSuggestions)