Add null protection for player death requests.

This commit is contained in:
tastybento 2019-09-25 13:46:34 -07:00
parent ff04f407af
commit 18c374bfa9

View File

@ -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);
}
/**