forked from RepoMirrors/kami-blue
formatting for visualrange
This commit is contained in:
parent
de3cd97c68
commit
b68b563788
|
@ -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<Boolean> leaving = register(Settings.b("Leaving", false));
|
||||
private Setting<Boolean> uwuAura = register(Settings.b("uwu Aura", false));
|
||||
private Setting<Boolean> uwuAura = register(Settings.b("UwU Aura", false));
|
||||
|
||||
private List<String> knownPlayers;
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if (mc.player == null) {
|
||||
return;
|
||||
}
|
||||
if (mc.player == null) return;
|
||||
|
||||
List<String> 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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue