chatspam
This commit is contained in:
parent
4416018d05
commit
eb3f323758
|
@ -2,10 +2,7 @@ package dev.coredoes.maple.manager
|
||||||
|
|
||||||
import dev.coredoes.maple.Manager
|
import dev.coredoes.maple.Manager
|
||||||
import dev.coredoes.maple.Maple
|
import dev.coredoes.maple.Maple
|
||||||
import dev.coredoes.maple.module.BotMovement
|
import dev.coredoes.maple.module.*
|
||||||
import dev.coredoes.maple.module.CreativeFlight
|
|
||||||
import dev.coredoes.maple.module.Module
|
|
||||||
import dev.coredoes.maple.module.NoFall
|
|
||||||
|
|
||||||
object ModuleManager : Manager {
|
object ModuleManager : Manager {
|
||||||
private val modules: MutableMap<String, Module> = mutableMapOf()
|
private val modules: MutableMap<String, Module> = mutableMapOf()
|
||||||
|
@ -14,6 +11,7 @@ object ModuleManager : Manager {
|
||||||
registerModule("botmovement", BotMovement)
|
registerModule("botmovement", BotMovement)
|
||||||
registerModule("nofall", NoFall)
|
registerModule("nofall", NoFall)
|
||||||
registerModule("creativeflight", CreativeFlight)
|
registerModule("creativeflight", CreativeFlight)
|
||||||
|
registerModule("chatspam", ChatSpam)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun stringName(): String {
|
override fun stringName(): String {
|
||||||
|
|
|
@ -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()}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue