Package dev.boze.api.addon
Class AddonCommand
java.lang.Object
dev.boze.api.addon.AddonCommand
Base class for addon commands.
 All addon commands should extend this class.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected static <T> com.mojang.brigadier.builder.RequiredArgumentBuilder<net.minecraft.command.CommandSource, T> Helper method to create an argument for the command builder.abstract voidbuild(com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.command.CommandSource> builder) Implement this method to build the command.Gets the command description.getName()Gets the command name.protected static com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.command.CommandSource> Helper method to create a literal for the command builder.voidregister(com.mojang.brigadier.CommandDispatcher<net.minecraft.command.CommandSource> dispatcher) Registers this command to the dispatcher.
- 
Constructor Details- 
AddonCommandCreates a new addon command.- Parameters:
- name- The name of the command
- description- A short description of what the command does
 
 
- 
- 
Method Details- 
argumentprotected static <T> com.mojang.brigadier.builder.RequiredArgumentBuilder<net.minecraft.command.CommandSource,T> argument(String name, com.mojang.brigadier.arguments.ArgumentType<T> type) Helper method to create an argument for the command builder.- Parameters:
- name- The name of the argument
- type- The type of the argument
- Returns:
- A new argument builder
 
- 
literalprotected static com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.command.CommandSource> literal(String name) Helper method to create a literal for the command builder.- Parameters:
- name- The name of the literal
- Returns:
- A new literal builder
 
- 
registerpublic void register(com.mojang.brigadier.CommandDispatcher<net.minecraft.command.CommandSource> dispatcher) Registers this command to the dispatcher.- Parameters:
- dispatcher- The dispatcher to register to
 
- 
buildpublic abstract void build(com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.command.CommandSource> builder) Implement this method to build the command.- Parameters:
- builder- The command builder
 
- 
getNameGets the command name.- Returns:
- The command name
 
- 
getDescriptionGets the command description.- Returns:
- The command description
 
 
-