forked from ChomeNS/chomens-bot-java
fix error (mabe)?
This commit is contained in:
parent
3627763bb9
commit
bb4ff97017
2 changed files with 46 additions and 40 deletions
|
@ -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 () {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue