aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/command/ClientCommandBase.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/dulkirmod/command/ClientCommandBase.kt')
-rw-r--r--src/main/kotlin/dulkirmod/command/ClientCommandBase.kt18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/command/ClientCommandBase.kt b/src/main/kotlin/dulkirmod/command/ClientCommandBase.kt
new file mode 100644
index 0000000..73a4fea
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/command/ClientCommandBase.kt
@@ -0,0 +1,18 @@
+package dulkirmod.command
+
+import net.minecraft.command.CommandBase
+import net.minecraft.command.ICommandSender
+
+abstract class ClientCommandBase protected constructor(private val name: String) : CommandBase() {
+ override fun getCommandName(): String {
+ return name
+ }
+
+ override fun getCommandUsage(sender: ICommandSender): String {
+ return "/$name"
+ }
+
+ override fun canCommandSenderUseCommand(sender: ICommandSender): Boolean {
+ return true
+ }
+} \ No newline at end of file