diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 787917dc..6e591cc4 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -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 { 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;