|
CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
|
A wrapper class for Minecraft 1.12's functions. More...
Inheritance diagram for dev.jorel.commandapi.wrappers.SimpleFunctionWrapper:Public Member Functions | |
| SimpleFunctionWrapper (NamespacedKey minecraftKey, @SuppressWarnings("rawtypes") ToIntFunction invoker, String[] internalCommands) | |
| Creates a SimpleFunctionWrapper. More... | |
| int | run (CommandSender sender) |
| Runs this function with a given CommandSender. More... | |
| String[] | getCommands () |
| Returns an array of commands that will be executed by this FunctionWrapper. More... | |
| NamespacedKey | getKey () |
| Returns the NamespacedKey that uniquely represents this object. More... | |
Static Public Member Functions | |
| static SimpleFunctionWrapper[] | getTag (NamespacedKey key) |
| Returns a SimpleFunctionWrapper[], which is an array of all of the functions that this tag contains. More... | |
| static SimpleFunctionWrapper | getFunction (NamespacedKey key) |
| Returns a SimpleFunctionWrapper representation of the Minecraft function for the provided NamespacedKey. More... | |
| static Set< NamespacedKey > | getFunctions () |
| Returns a set of all functions that the server has registered. More... | |
| static Set< NamespacedKey > | getTags () |
| Returns a set of all tags that the server has registered. More... | |
A wrapper class for Minecraft 1.12's functions.
| dev.jorel.commandapi.wrappers.SimpleFunctionWrapper.SimpleFunctionWrapper | ( | NamespacedKey | minecraftKey, |
| @SuppressWarnings("rawtypes") ToIntFunction | invoker, | ||
| String[] | internalCommands | ||
| ) |
Creates a SimpleFunctionWrapper.
| minecraftKey | the MinecraftKey which is used to reference this function |
| invoker | a method which, when invoked, runs the function |
| internalCommands | a String[] of internal commands that this customFunction represents. Typically customFunction.b().map(Object::toString) |
| String[] dev.jorel.commandapi.wrappers.SimpleFunctionWrapper.getCommands | ( | ) |
Returns an array of commands that will be executed by this FunctionWrapper.
|
static |
Returns a SimpleFunctionWrapper representation of the Minecraft function for the provided NamespacedKey.
| key | a NamespacedKey representation of the function |
|
static |
Returns a set of all functions that the server has registered.
| NamespacedKey dev.jorel.commandapi.wrappers.SimpleFunctionWrapper.getKey | ( | ) |
Returns the NamespacedKey that uniquely represents this object.
|
static |
Returns a SimpleFunctionWrapper[], which is an array of all of the functions that this tag contains.
| key | a NamespacedKey representation of the tag. This key should not include a # symbol. |
|
static |
Returns a set of all tags that the server has registered.
| int dev.jorel.commandapi.wrappers.SimpleFunctionWrapper.run | ( | CommandSender | sender | ) |
Runs this function with a given CommandSender.
| sender | the sender to use to run this function |