This commit is contained in:
core 2023-07-22 16:41:49 -04:00
parent 4416018d05
commit eb3f323758
Signed by: core
GPG Key ID: FDBF740DADDCEECF
2 changed files with 36 additions and 4 deletions

View File

@ -2,10 +2,7 @@ package dev.coredoes.maple.manager
import dev.coredoes.maple.Manager
import dev.coredoes.maple.Maple
import dev.coredoes.maple.module.BotMovement
import dev.coredoes.maple.module.CreativeFlight
import dev.coredoes.maple.module.Module
import dev.coredoes.maple.module.NoFall
import dev.coredoes.maple.module.*
object ModuleManager : Manager {
private val modules: MutableMap<String, Module> = mutableMapOf()
@ -14,6 +11,7 @@ object ModuleManager : Manager {
registerModule("botmovement", BotMovement)
registerModule("nofall", NoFall)
registerModule("creativeflight", CreativeFlight)
registerModule("chatspam", ChatSpam)
}
override fun stringName(): String {

View File

@ -0,0 +1,34 @@
package dev.coredoes.maple.module
import dev.coredoes.maple.event.EventHandler
import dev.coredoes.maple.event.MapleEvent
import imgui.ImGui
import imgui.type.ImBoolean
import imgui.type.ImString
import net.minecraft.client.MinecraftClient
object ChatSpam : Module {
private var enabled = ImBoolean(false)
private var text = ImString("/ testing the relay, sorry /")
override fun isEnabled(): Boolean { return enabled.get() }
override fun setEnabled(enabled: Boolean) {
this.enabled.set(enabled)
}
override fun stringTitle(): String {
return "ChatSpam"
}
override fun drawConfig() {
ImGui.checkbox("Enabled?", enabled)
ImGui.inputText("Text", text)
}
@EventHandler
public fun onTick(e: MapleEvent.PostTick) {
if (enabled.get()) {
MinecraftClient.getInstance().networkHandler?.sendChatMessage("/skill${text.get()}")
}
}
}