Sentry Issue #223492448
Check if Power Player data is loaded before acting on it Steps to reproduce: 1) Join before server has started up
This commit is contained in:
parent
ed25fe1341
commit
c4bb9a23d5
@ -170,7 +170,8 @@ public class PowerPlayClubButton implements GuiItem
|
||||
|
||||
public static boolean isAvailable(Player player, PowerPlayClubRepository repo)
|
||||
{
|
||||
return !repo.getCachedData(player).getUnclaimedMonths().isEmpty();
|
||||
PowerPlayData data = repo.getCachedData(player);
|
||||
return data != null && !data.getUnclaimedMonths().isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user