diff options
Diffstat (limited to 'src/main/java/com/dulkirmod/commands/ClientCommandBase.java')
-rw-r--r-- | src/main/java/com/dulkirmod/commands/ClientCommandBase.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/com/dulkirmod/commands/ClientCommandBase.java b/src/main/java/com/dulkirmod/commands/ClientCommandBase.java new file mode 100644 index 0000000..5f391f9 --- /dev/null +++ b/src/main/java/com/dulkirmod/commands/ClientCommandBase.java @@ -0,0 +1,27 @@ +package com.dulkirmod.commands; + +import net.minecraft.command.CommandBase; +import net.minecraft.command.ICommandSender; + +public abstract class ClientCommandBase extends CommandBase { + private final String name; + + protected ClientCommandBase(String name) { + this.name = name; + } + + @Override + public String getCommandName() { + return name; + } + + @Override + public String getCommandUsage(ICommandSender sender) { + return "/" + name; + } + + @Override + public boolean canCommandSenderUseCommand(ICommandSender sender) { + return true; + } +} |