Package org.kingdoms.commands.brigadier
Class MinecraftArgumentTypes
java.lang.Object
org.kingdoms.commands.brigadier.MinecraftArgumentTypes
A registry of the
ArgumentTypes provided by Minecraft.-
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.brigadier.arguments.ArgumentType<?>getByKey(org.bukkit.NamespacedKey key) Gets a registered argument type by key.static Class<? extends com.mojang.brigadier.arguments.ArgumentType<?>>getClassByKey(org.bukkit.NamespacedKey key) Gets a registered argument type class by key.static booleanisRegistered(org.bukkit.NamespacedKey key) Gets if a argument is registered for the given key.
-
Method Details
-
isRegistered
public static boolean isRegistered(org.bukkit.NamespacedKey key) Gets if a argument is registered for the given key.- Parameters:
key- the key- Returns:
- if an argument is registered
-
getClassByKey
public static Class<? extends com.mojang.brigadier.arguments.ArgumentType<?>> getClassByKey(org.bukkit.NamespacedKey key) throws IllegalArgumentException Gets a registered argument type class by key.- Parameters:
key- the key- Returns:
- the returned argument type class
- Throws:
IllegalArgumentException- if no such argument is registered
-
getByKey
public static com.mojang.brigadier.arguments.ArgumentType<?> getByKey(org.bukkit.NamespacedKey key) throws IllegalArgumentException Gets a registered argument type by key.- Parameters:
key- the key- Returns:
- the returned argument
- Throws:
IllegalArgumentException- if no such argument is registered
-