aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java b/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java
new file mode 100644
index 00000000..47174f32
--- /dev/null
+++ b/src/main/java/io/github/moulberry/notenoughupdates/commands/ClientCommandBase.java
@@ -0,0 +1,28 @@
+package io.github.moulberry.notenoughupdates.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;
+ }
+}