Team currentTeam = Team.getTeamByPlayerName(player.getName());
Warzone playerWarzone = Warzone.getZoneByPlayerName(player.getName()); // this uses the teams, so it asks: get the player's team's warzone
boolean protecting = false;
if (currentTeam != null) {
if (playerWarzone.getWarzoneConfig().getBoolean(WarzoneConfig.GLASSWALLS)) {
protecting = playerWarzone.protectZoneWallAgainstPlayer(player);
}
} else {
Warzone nearbyZone = War.war.zoneOfZoneWallAtProximity(playerLoc);
if (nearbyZone != null && nearbyZone.getWarzoneConfig().getBoolean(WarzoneConfig.GLASSWALLS) && !isMaker) {
protecting = nearbyZone.protectZoneWallAgainstPlayer(player);