diff options
author | appable <enzospiacitelli@gmail.com> | 2022-10-11 14:32:32 -0700 |
---|---|---|
committer | appable <enzospiacitelli@gmail.com> | 2022-10-11 14:32:32 -0700 |
commit | 363b2426f8d9e45e52c472750c798dcaceb05a88 (patch) | |
tree | d50c71d73f4333253ef28f5e53c1a148fc7f8ab5 /src/main/kotlin/com/examplemod/commands | |
download | AmbientAddons-363b2426f8d9e45e52c472750c798dcaceb05a88.tar.gz AmbientAddons-363b2426f8d9e45e52c472750c798dcaceb05a88.tar.bz2 AmbientAddons-363b2426f8d9e45e52c472750c798dcaceb05a88.zip |
Initial commit
Diffstat (limited to 'src/main/kotlin/com/examplemod/commands')
-rw-r--r-- | src/main/kotlin/com/examplemod/commands/ExampleCommand.kt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/kotlin/com/examplemod/commands/ExampleCommand.kt b/src/main/kotlin/com/examplemod/commands/ExampleCommand.kt new file mode 100644 index 0000000..12538ca --- /dev/null +++ b/src/main/kotlin/com/examplemod/commands/ExampleCommand.kt @@ -0,0 +1,23 @@ +package com.examplemod.commands + +import ExampleMod +import com.examplemod.config.Config +import net.minecraft.command.CommandBase +import net.minecraft.command.ICommandSender +import net.minecraft.util.ChatComponentText +import net.minecraft.util.IChatComponent + +class ExampleCommand : CommandBase() { + override fun getCommandName() = "examplemod" + + override fun getCommandAliases() = listOf("example") + + override fun getCommandUsage(sender: ICommandSender?) = "/$commandName" + + override fun getRequiredPermissionLevel() = 0 + + override fun processCommand(sender: ICommandSender?, args: Array<out String>?) { + sender?.addChatMessage(ChatComponentText("Example command run!")) + ExampleMod.currentGui = Config.gui() + } +}
\ No newline at end of file |