diff options
Diffstat (limited to 'src/main/java/com/example/commands/ClientCommandBase.java')
-rw-r--r-- | src/main/java/com/example/commands/ClientCommandBase.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/com/example/commands/ClientCommandBase.java b/src/main/java/com/example/commands/ClientCommandBase.java new file mode 100644 index 0000000..566fb6e --- /dev/null +++ b/src/main/java/com/example/commands/ClientCommandBase.java @@ -0,0 +1,27 @@ +package com.example.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;
+ }
+}
|