Marcos
2024-05-15 11:04:49 +02:00
committed by GitHub
parent f204244797
commit 3a6a0d80ef

View File

@@ -88,6 +88,8 @@ public class AntiVanish extends Module {
for (String playerName : completionPlayerCache) {
if (Objects.equals(playerName, mc.player.getName().getString())) continue;
if (playerName.contains(" ")) continue;
if (playerName.length() < 3 || playerName.length() > 16) continue;
if (joinedOrQuit.test(playerName)) {
info("Player joined: " + playerName);
}
@@ -95,6 +97,8 @@ public class AntiVanish extends Module {
for (String playerName : lastUsernames) {
if (Objects.equals(playerName, mc.player.getName().getString())) continue;
if (playerName.contains(" ")) continue;
if (playerName.length() < 3 || playerName.length() > 16) continue;
if (joinedOrQuit.test(playerName)) {
info("Player left: " + playerName);
}
@@ -124,6 +128,8 @@ public class AntiVanish extends Module {
for (UUID uuid : oldPlayers.keySet()) {
if (playerCache.containsKey(uuid)) continue;
String name = oldPlayers.get(uuid);
if (name.contains(" ")) continue;
if (name.length() < 3 || name.length() > 16) continue;
if (messageCache.stream().noneMatch(s -> s.contains(name))) {
warning(name + " has gone into vanish.");
}