Check if null before accessing observer
This commit is contained in:
parent
e8ba0a2adc
commit
a3e159d162
@ -34,7 +34,7 @@ public class PacketListenerClientInteract extends PacketAdapter {
|
||||
|
||||
Player observer = event.getPlayer();
|
||||
|
||||
if (observer.getName().contains("UNKNOWN[")) // If the player is temporary
|
||||
if (observer == null || observer.getName().contains("UNKNOWN[")) // If the player is temporary
|
||||
return;
|
||||
|
||||
if (!observer.isOp() && "%%__USER__%%".equals(123 + "45")) {
|
||||
|
Loading…
Reference in New Issue
Block a user