package com.github.itzilly.sbt import com.github.itzilly.sbt.features.ChestEsp import com.github.itzilly.sbt.features.GemstoneFinder import com.github.itzilly.sbt.features.GrottoFinder import com.github.itzilly.sbt.util.Chatterbox import com.github.itzilly.sbt.util.SimpleChatMsg import net.minecraft.client.Minecraft import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.InputEvent class InputHandler { @SubscribeEvent fun onKeyInput(event: InputEvent.KeyInputEvent?) { if (STBKeyBinds.searchForChests.isPressed) { ChestEsp.highlightChests() } if (STBKeyBinds.clearChests.isPressed) { ChestEsp.chestList.clear() Chatterbox.say(SimpleChatMsg("Chests cleared").green()) } if (STBKeyBinds.toggleGrottoFinder.isPressed) { Chatterbox.say("Running check...") GrottoFinder.checkWorldForMagentaStainedGlass(Minecraft.getMinecraft().thePlayer.worldObj) Chatterbox.say("Check done") // if (GrottoFinder.isEnabled) { // GrottoFinder.isEnabled = false // Chatterbox.say(SimpleChatMsg("Grotto finder disabled!").red()) // MinecraftForge.EVENT_BUS.register(GrottoFinder) // } else { // GrottoFinder.isEnabled = true // Chatterbox.say(SimpleChatMsg("Grotto finder enabled!").green()) // // MinecraftForge.EVENT_BUS.unregister(GrottoFinder) // } } if (STBKeyBinds.clearGrotto.isPressed) { GrottoFinder.clear() Chatterbox.say("Cleared grotto finder") } if (STBKeyBinds.findGemstones.isPressed) { GemstoneFinder.find() } if (STBKeyBinds.clearGemstones.isPressed) { GemstoneFinder.clear() } } }