mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-10 09:21:31 +01:00
Prevent NPE
@Poslovich - you were right!
This commit is contained in:
parent
db464d5c04
commit
765f774652
@ -128,7 +128,7 @@ public abstract class FlagListener implements Listener {
|
||||
// Set user
|
||||
user = player == null ? null : User.getInstance(player);
|
||||
if (loc == null) {
|
||||
if (user.getLocation() != null && user.getLocation().getWorld() != null) {
|
||||
if (user != null && user.getLocation() != null && user.getLocation().getWorld() != null) {
|
||||
report(user, e, user.getLocation(), flag, Why.NULL_LOCATION);
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user