public class CommandRegistry extends Object
| Modifier and Type | Field and Description |
|---|---|
static CommandRegistry |
INSTANCE |
| Constructor and Description |
|---|
CommandRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
register(boolean dedicated,
Consumer<com.mojang.brigadier.CommandDispatcher<net.minecraft.server.command.ServerCommandSource>> consumer)
Register a command provider.
|
public static final CommandRegistry INSTANCE
public void register(boolean dedicated,
Consumer<com.mojang.brigadier.CommandDispatcher<net.minecraft.server.command.ServerCommandSource>> consumer)
dedicated - If true, the command is only registered on the dedicated server.consumer - The command provider, consuming CommandDispatcher.