mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-26 20:55:41 +01:00
Add null protection for player death requests.
This commit is contained in:
parent
ff04f407af
commit
18c374bfa9
@ -368,7 +368,7 @@ public class PlayersManager {
|
||||
*/
|
||||
public int getDeaths(World world, UUID playerUUID) {
|
||||
addPlayer(playerUUID);
|
||||
return playerCache.get(playerUUID).getDeaths(world);
|
||||
return playerCache.get(playerUUID) == null ? 0 : playerCache.get(playerUUID).getDeaths(world);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user