mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
If a variable can be null, check it before using it.
This commit is contained in:
parent
c85bd8ab70
commit
a2450d2d07
@ -167,6 +167,10 @@ public class PlayerListener implements Listener {
|
|||||||
|
|
||||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player);
|
||||||
|
|
||||||
|
if (mcMMOPlayer == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mcMMOPlayer.checkGodMode();
|
mcMMOPlayer.checkGodMode();
|
||||||
mcMMOPlayer.checkParty();
|
mcMMOPlayer.checkParty();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user