try catch it for now so i can see what caused it
This commit is contained in:
parent
87e6dc5889
commit
8dede5fa23
1 changed files with 85 additions and 72 deletions
|
@ -60,6 +60,7 @@ public class ChatPlugin extends Bot.Listener {
|
|||
}
|
||||
|
||||
public void packetReceived (ClientboundSystemChatPacket packet) {
|
||||
try {
|
||||
final Component component = packet.getContent();
|
||||
|
||||
try {
|
||||
|
@ -69,7 +70,8 @@ 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;
|
||||
|
||||
|
@ -86,9 +88,13 @@ 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);
|
||||
|
@ -120,11 +126,15 @@ 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
|
||||
|
@ -169,6 +179,9 @@ public class ChatPlugin extends Bot.Listener {
|
|||
listener.systemMessageReceived(component);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void sendChatTick () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue