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