diff options
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt')
-rw-r--r-- | src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt b/src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt new file mode 100644 index 0000000..5bfd92b --- /dev/null +++ b/src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt @@ -0,0 +1,28 @@ +package com.ambientaddons.commands + +import AmbientAddons +import com.ambientaddons.config.Config +import com.ambientaddons.utils.Extensions.withModPrefix +import com.ambientaddons.utils.LocationUtils +import gg.essential.universal.UChat +import net.minecraft.command.CommandBase +import net.minecraft.command.ICommandSender + +class AmbientCommand : CommandBase() { + override fun getCommandName() = "ambientaddons" + + override fun getCommandAliases() = listOf("aa") + + override fun getCommandUsage(sender: ICommandSender?) = "/$commandName" + + override fun getRequiredPermissionLevel() = 0 + + override fun processCommand(sender: ICommandSender?, args: Array<String>) { + when (args.getOrNull(0)) { + null -> AmbientAddons.currentGui = Config.gui() + "location" -> UChat.chat(LocationUtils.toString().withModPrefix()) + "buy" -> AutoBuyCommand.processCommand(args.drop(1)) + else -> UChat.chat("§cUnknown argument!") + } + } +}
\ No newline at end of file |