Custom Commands (Minecraft)
Description
Create custom commands, either generally or specifically for the client.
Identifier
Refer to this via any of the following:
minecraft.command/* Used as page default */
minecraft.Command
Minecraft.command
Minecraft.Command
vanilla.command
vanilla.Command
Vanilla.command
Vanilla.Command
mods.mc.command
mods.mc.Command
mods.vanilla.command
mods.vanilla.Command
mods.minecraft.command
mods.minecraft.CommandAdding Entries
Registers the given command to the client:
groovyminecraft.command.registerClientCommand(ICommand)Registers the given command to the client in the format
name,command, withcommandbeing a Closure taking 3 parameters,MinecraftServer server,ICommandSender sender, andString... args:groovyminecraft.command.registerClientCommand(String, SimpleCommand.ICommand)Registers the given command to the client in the format
name,usage,command, withcommandbeing a Closure taking 3 parameters,MinecraftServer server,ICommandSender sender, andString... args:groovyminecraft.command.registerClientCommand(String, String, SimpleCommand.ICommand)Registers the given command to the given command handler, in the format
handler,command:groovyminecraft.command.registerCommand(CommandHandler, ICommand)Registers the given command:
groovyminecraft.command.registerCommand(ICommand)Registers the given command in the format
name,command, withcommandbeing a Closure taking 3 parameters,MinecraftServer server,ICommandSender sender, andString... args:groovyminecraft.command.registerCommand(String, SimpleCommand.ICommand)Registers the given command in the format
name,usage,command, withcommandbeing a Closure taking 3 parameters,MinecraftServer server,ICommandSender sender, andString... args:groovyminecraft.command.registerCommand(String, String, SimpleCommand.ICommand)
Example
minecraft.command.registerCommand('groovy_test', { server, sender, args -> sender.sendMessage('Hello from GroovyScript')})