Browse Source

null checks for Building.getFriends()

magicbox-1.5.2
FatBoy-DOTC 1 year ago
parent
commit
5e629e7890
  1. 6
      src/engine/gameManager/BuildingManager.java

6
src/engine/gameManager/BuildingManager.java

@ -118,7 +118,7 @@ public enum BuildingManager { @@ -118,7 +118,7 @@ public enum BuildingManager {
return true;
//individual friend.
if (building.getFriends().get(player.getObjectUUID()) != null)
if (building.getFriends() != null && building.getFriends().get(player.getObjectUUID()) != null)
return true;
//Admin's can access stuff
@ -132,11 +132,11 @@ public enum BuildingManager { @@ -132,11 +132,11 @@ public enum BuildingManager {
if (building.getGuild() != null && building.getGuild().isGuildLeader(player.getObjectUUID()))
return true;
if (building.getFriends().get(player.getGuild().getObjectUUID()) != null
if (building.getFriends() != null && building.getFriends().get(player.getGuild().getObjectUUID()) != null
&& building.getFriends().get(player.getGuild().getObjectUUID()).friendType == 8)
return true;
if (building.getFriends().get(player.getGuild().getObjectUUID()) != null
if (building.getFriends() != null && building.getFriends().get(player.getGuild().getObjectUUID()) != null
&& building.getFriends().get(player.getGuild().getObjectUUID()).friendType == 9
&& GuildStatusController.isInnerCouncil(player.getGuildStatus()))
return true;

Loading…
Cancel
Save