Class ResourceLocationArgument
java.lang.Object
com.zenith.command.brigadier.ResourceLocationArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<net.kyori.adventure.key.Key>, SerializableArgumentType<net.kyori.adventure.key.Key>
public class ResourceLocationArgument
extends Object
implements SerializableArgumentType<net.kyori.adventure.key.Key>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull CommandParserstatic net.kyori.adventure.key.KeygetId(com.mojang.brigadier.context.CommandContext<CommandContext> context, String name) static ResourceLocationArgumentid()net.kyori.adventure.key.Keyparse(com.mojang.brigadier.StringReader reader) static net.kyori.adventure.key.Keyread(com.mojang.brigadier.StringReader reader) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mojang.brigadier.arguments.ArgumentType
getExamples, listSuggestions, parseMethods inherited from interface SerializableArgumentType
askServerForSuggestions, commandProperties
-
Field Details
-
INVALID_RESOURCE_LOCATION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_RESOURCE_LOCATION
-
-
Constructor Details
-
ResourceLocationArgument
public ResourceLocationArgument()
-
-
Method Details
-
id
-
getId
public static net.kyori.adventure.key.Key getId(com.mojang.brigadier.context.CommandContext<CommandContext> context, String name) -
parse
public net.kyori.adventure.key.Key parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parsein interfacecom.mojang.brigadier.arguments.ArgumentType<net.kyori.adventure.key.Key>- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
read
public static net.kyori.adventure.key.Key read(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
commandParser
- Specified by:
commandParserin interfaceSerializableArgumentType<net.kyori.adventure.key.Key>
-