Do that fix for main packet listener too

This commit is contained in:
libraryaddict 2020-03-25 22:15:34 +13:00
parent 324c675055
commit 356519be19
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -29,7 +29,8 @@ public class PacketListenerMain extends PacketAdapter {
final Player observer = event.getPlayer();
if (observer.getName().contains("UNKNOWN[")) // If the player is temporary
if (observer == null || observer.getName() == null ||
observer.getName().contains("UNKNOWN[")) // If the player is temporary
return;
// First get the entity, the one sending this packet