Class WorldArgument
java.lang.Object
org.core.command.argument.arguments.position.WorldArgument
- All Implemented Interfaces:
CommandArgument<WorldExtent>
,ParseCommandArgument<WorldExtent>
,SuggestCommandArgument<WorldExtent>
Gets a world from a single argument, if the source of the command is locatable then this command
becomes optional whereby if the string argument is not provided then it will use the world the source is in.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
Gets the ID of the command argument.parse(CommandContext context, CommandArgumentContext<WorldExtent> argument)
suggest(CommandContext commandContext, CommandArgumentContext<WorldExtent> argument)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.core.command.argument.CommandArgument
getUsage
Methods inherited from interface org.core.command.argument.SuggestCommandArgument
errorMessage
-
Constructor Details
-
WorldArgument
-
-
Method Details
-
getId
Description copied from interface:CommandArgument
Gets the ID of the command argument. A command argument id needs to be unique within the command, the ID is what separates the arguments. There isn't a standard message structure, however by default the id will be what shows in the usage- Specified by:
getId
in interfaceCommandArgument<WorldExtent>
- Returns:
- a string Id
-
parse
public CommandArgumentResult<WorldExtent> parse(CommandContext context, CommandArgumentContext<WorldExtent> argument) throws IOException- Specified by:
parse
in interfaceParseCommandArgument<WorldExtent>
- Throws:
IOException
-
suggest
public Set<String> suggest(CommandContext commandContext, CommandArgumentContext<WorldExtent> argument)- Specified by:
suggest
in interfaceSuggestCommandArgument<WorldExtent>
-