diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/combat/VisualRange.java b/src/main/java/me/zeroeightsix/kami/module/modules/combat/VisualRange.java index ccef9aad..0110bd91 100644 --- a/src/main/java/me/zeroeightsix/kami/module/modules/combat/VisualRange.java +++ b/src/main/java/me/zeroeightsix/kami/module/modules/combat/VisualRange.java @@ -17,39 +17,30 @@ import java.util.List; /** * Created on 26 October 2019 by hub * Updated 12 January 2020 by hub + * Updated by polymer on 23/02/20 */ @Module.Info(name = "VisualRange", description = "Shows players who enter and leave range in chat", category = Module.Category.COMBAT) public class VisualRange extends Module { - private Setting leaving = register(Settings.b("Leaving", false)); - private Setting uwuAura = register(Settings.b("uwu Aura", false)); + private Setting uwuAura = register(Settings.b("UwU Aura", false)); private List knownPlayers; @Override public void onUpdate() { - - if (mc.player == null) { - return; - } + if (mc.player == null) return; List tickPlayerList = new ArrayList<>(); for (Entity entity : mc.world.getLoadedEntityList()) { - if (entity instanceof EntityPlayer) { - tickPlayerList.add(entity.getName()); - } + if (entity instanceof EntityPlayer) tickPlayerList.add(entity.getName()); } if (tickPlayerList.size() > 0) { for (String playerName : tickPlayerList) { - - if (playerName.equals(mc.player.getName())) { - continue; - } + if (playerName.equals(mc.player.getName())) continue; if (!knownPlayers.contains(playerName)) { - knownPlayers.add(playerName); if (Friends.isFriend(playerName)) { @@ -57,22 +48,16 @@ public class VisualRange extends Module { } else { sendNotification(ChatFormatting.RED.toString() + playerName + ChatFormatting.RESET.toString() + " entered the Battlefield!"); } - if (uwuAura.getValue()) { - Minecraft.getMinecraft().playerController.connection.sendPacket(new CPacketChatMessage("/w "+ playerName + " hi uwu")); - } + if (uwuAura.getValue()) Minecraft.getMinecraft().playerController.connection.sendPacket(new CPacketChatMessage("/w "+ playerName + " hi uwu")); return; - } - } } if (knownPlayers.size() > 0) { for (String playerName : knownPlayers) { - if (!tickPlayerList.contains(playerName)) { - knownPlayers.remove(playerName); if (leaving.getValue()) { @@ -81,13 +66,10 @@ public class VisualRange extends Module { } else { sendNotification(ChatFormatting.RED.toString() + playerName + ChatFormatting.RESET.toString() + " left the Battlefield!"); } - if (uwuAura.getValue()) { - Minecraft.getMinecraft().playerController.connection.sendPacket(new CPacketChatMessage("/w "+ playerName + " bye uwu")); - } + if (uwuAura.getValue()) Minecraft.getMinecraft().playerController.connection.sendPacket(new CPacketChatMessage("/w "+ playerName + " bye uwu")); } return; - } } }