Class RegionFlagArgumentType
java.lang.Object
de.z0rdak.yawp.commands.arguments.flag.RegionFlagArgumentType
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<String>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RegionFlagArgumentTypeflag()Using this as an actual argument does not work on a server-side only mod, because it needs to be registered in the corresponding registry.static RegionFlaggetFlag(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String argName) static Set<RegionFlag> getFlags(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String argName) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> ctx, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) parse(com.mojang.brigadier.StringReader reader) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mojang.brigadier.arguments.ArgumentType
parse
-
Field Details
-
VALID_FLAG_PATTERN
-
-
Constructor Details
-
RegionFlagArgumentType
public RegionFlagArgumentType()
-
-
Method Details
-
flag
Using this as an actual argument does not work on a server-side only mod, because it needs to be registered in the corresponding registry. -
getFlag
public static RegionFlag getFlag(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String argName) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFlags
public static Set<RegionFlag> getFlags(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String argName) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
parse
public String parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parsein interfacecom.mojang.brigadier.arguments.ArgumentType<String>- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getExamples
- Specified by:
getExamplesin interfacecom.mojang.brigadier.arguments.ArgumentType<String>
-
listSuggestions
public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> ctx, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) - Specified by:
listSuggestionsin interfacecom.mojang.brigadier.arguments.ArgumentType<String>
-