From 60d1e841a907fff50fd7efb060e0f60a879f3e6c Mon Sep 17 00:00:00 2001 From: Dominika Date: Sun, 29 Nov 2020 16:55:09 -0500 Subject: [PATCH] [fix] Pyro Client bug Closes #1649 Signed-off-by: Dominika --- .../me/zeroeightsix/kami/module/modules/misc/FakePlayer.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/misc/FakePlayer.kt b/src/main/java/me/zeroeightsix/kami/module/modules/misc/FakePlayer.kt index 67b7861c1..2c86125bd 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/misc/FakePlayer.kt +++ b/src/main/java/me/zeroeightsix/kami/module/modules/misc/FakePlayer.kt @@ -22,6 +22,7 @@ object FakePlayer : Module() { val playerName = register(Settings.stringBuilder("PlayerName").withValue("Player").withVisibility { false }) private var fakePlayer: EntityOtherPlayerMP? = null + private const val ENTITY_ID = -7170400 init { listener { @@ -38,6 +39,7 @@ object FakePlayer : Module() { disable() return } + if (playerName.value == "Player") { MessageSendHelper.sendChatMessage("You can use &7'${Command.commandPrefix.value}fp '&r to set a custom name") } @@ -47,12 +49,13 @@ object FakePlayer : Module() { rotationYawHead = mc.player.rotationYawHead if (copyInventory.value) inventory.copyInventory(mc.player.inventory) }.also { - mc.world.addEntityToWorld(-911, it) + mc.world.addEntityToWorld(ENTITY_ID, it) } } override fun onDisable() { if (mc.world == null || mc.player == null) return fakePlayer?.setDead() + mc.world?.removeEntityFromWorld(ENTITY_ID) } } \ No newline at end of file