fix error (mabe)?

This commit is contained in:
Chayapak 2023-06-30 21:47:44 +07:00
parent 3627763bb9
commit bb4ff97017
2 changed files with 46 additions and 40 deletions

View file

@ -154,6 +154,7 @@ public class ChatPlugin extends Bot.Listener {
}
public void packetReceived (ClientboundDisguisedChatPacket packet) {
try {
final String translation = getTranslationByChatType(packet.getChatType());
final Component component = packet.getMessage();
@ -206,6 +207,9 @@ public class ChatPlugin extends Bot.Listener {
listener.systemMessageReceived(component);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void sendChatTick () {

View file

@ -113,6 +113,8 @@ public class FilterPlugin extends PlayersPlugin.Listener {
}
public void playerMessageReceived (PlayerMessage message) {
if (message.sender().profile().getName() == null) return;
final FilteredPlayer player = getPlayer(message.sender().profile().getName());
if (player == null) return;