Class WorldArgument<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,org.bukkit.World>
cloud.commandframework.bukkit.parsers.WorldArgument<C>
- Type Parameters:
C- Command sender type
- All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<org.bukkit.World>,Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>
public class WorldArgument<C>
extends cloud.commandframework.arguments.CommandArgument<C,org.bukkit.World>
cloud argument type that parses Bukkit
worlds-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWorldArgument(boolean required, @NonNull String name, @NonNull String defaultValue, @Nullable BiFunction<cloud.commandframework.context.CommandContext<C>, String, List<String>> suggestionsProvider, @NonNull cloud.commandframework.ArgumentDescription defaultDescription) -
Method Summary
Modifier and TypeMethodDescriptionstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument.Builder<C,org.bukkit.World> newBuilder(@NonNull String name) Create a new builderstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.World> Create a new required argumentstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.World> Create a new optional argumentstatic <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.World> Create a new optional argument with a default valueMethods inherited from class cloud.commandframework.arguments.CommandArgument
addPreprocessor, compareTo, copy, equals, getDefaultDescription, getDefaultValue, getKey, getName, getOwningCommand, getParser, getSuggestionsProvider, getValueType, hasDefaultValue, hashCode, isArgumentRegistered, isRequired, ofType, ofType, preprocess, setArgumentRegistered, setOwningCommand, toString
-
Constructor Details
-
WorldArgument
-
-
Method Details
-
newBuilder
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument.Builder<C,org.bukkit.World> newBuilder(@NonNull String name) Create a new builder- Type Parameters:
C- Command sender type- Parameters:
name- Name of the argument- Returns:
- Created builder
-
of
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.World> of(@NonNull String name) Create a new required argument- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.World> optional(@NonNull String name) Create a new optional argument- Type Parameters:
C- Command sender type- Parameters:
name- Argument name- Returns:
- Created argument
-
optional
public static <C> @NonNull cloud.commandframework.arguments.CommandArgument<C,org.bukkit.World> optional(@NonNull String name, @NonNull String defaultValue) Create a new optional argument with a default value- Type Parameters:
C- Command sender type- Parameters:
name- Argument namedefaultValue- Default value- Returns:
- Created argument
-