ah i see why its just the new anti skid update thing,.,.

This commit is contained in:
Chayapak 2023-05-03 07:23:03 +07:00
parent 8dede5fa23
commit 979bb5c358
2 changed files with 75 additions and 86 deletions

View file

@ -32,7 +32,9 @@ public class ChatCommandHandlerPlugin extends ChatPlugin.ChatListener {
public void commandSpyMessageReceived (PlayerMessage message) { listener(message, true); }
private void listener (PlayerMessage message, boolean cspy) {
try {
if (message.sender().profile().getName().equals(bot.username())) return;
} catch (Exception ignored) {} // kinda sus ngl
final Component displayNameComponent = message.displayName();
final Component messageComponent = message.contents();

View file

@ -60,7 +60,6 @@ public class ChatPlugin extends Bot.Listener {
}
public void packetReceived (ClientboundSystemChatPacket packet) {
try {
final Component component = packet.getContent();
try {
@ -70,8 +69,7 @@ public class ChatPlugin extends Bot.Listener {
key.equals("advMode.setCommand.success") ||
key.equals("advMode.notAllowed")
) return;
} catch (ClassCastException ignored) {
}
} catch (ClassCastException ignored) {}
PlayerMessage playerMessage = null;
@ -88,13 +86,9 @@ public class ChatPlugin extends Bot.Listener {
if (playerMessage != null) listener.playerMessageReceived(playerMessage);
if (commandSpyMessage != null) listener.commandSpyMessageReceived(commandSpyMessage);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void packetReceived (ClientboundPlayerChatPacket packet) {
try {
final UUID senderUUID = packet.getSender();
final MutablePlayerListEntry entry = bot.players().getEntry(senderUUID);
@ -126,15 +120,11 @@ public class ChatPlugin extends Bot.Listener {
listener.systemMessageReceived(unsignedContent);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void packetReceived (ClientboundDisguisedChatPacket packet) {
// totallynotskidded from chipmunkbot and modified i guess
try {
final int type = packet.getChatType();
// i think im missing other types
@ -179,9 +169,6 @@ public class ChatPlugin extends Bot.Listener {
listener.systemMessageReceived(component);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void sendChatTick () {