Package me.lucko.commodore
Class MinecraftArgumentTypes
- java.lang.Object
-
- me.lucko.commodore.MinecraftArgumentTypes
-
public final class MinecraftArgumentTypes extends Object
A registry of theArgumentTypes provided by Minecraft.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
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 IllegalArgumentExceptionGets a registered argument type by key.- Parameters:
key- the key- Returns:
- the returned argument
- Throws:
IllegalArgumentException- if no such argument is registered
-
-