Examples of ZoneLobby


Examples of com.tommytony.war.structure.ZoneLobby

      if (!(this.getSender() instanceof Player)) {
        return false;
      }
      zone = Warzone.getZoneByLocation((Player) this.getSender());
      if (zone == null) {
        ZoneLobby lobby = ZoneLobby.getLobbyByLocation((Player) this.getSender());
        if (lobby == null) {
          return false;
        }
        zone = lobby.getZone();
      }
    } else {
      return false;
    }
View Full Code Here

Examples of com.tommytony.war.structure.ZoneLobby

      War.war.msg(this.player, msgString.toString());
      warzone.saveState(false); // we just changed the volume, cant reset walls
     
      if (warzone.getLobby() == null) {
        // Set default lobby on south side
        ZoneLobby lobby = new ZoneLobby(warzone, Direction.SOUTH());
        warzone.setLobby(lobby);
        if (War.war.getWarHub() != null) { // warhub has to change
          War.war.getWarHub().getVolume().resetBlocks();
          War.war.getWarHub().initialize();
        }
View Full Code Here

Examples of com.tommytony.war.structure.ZoneLobby

    }
  }

  private void sendMessageToAllWarzonePlayers(String message) {
    for (Player player : War.war.getServer().getOnlinePlayers()) {
      ZoneLobby lobby = ZoneLobby.getLobbyByLocation(player);
      if (player != PartialZoneResetJob.sendersToNotify.get(zone)
          && (zone.getPlayers().contains(player)
            || (lobby != null && lobby.getZone() == zone))) {
        War.war.msg(player, message);
      }
    }
   
    if (PartialZoneResetJob.sendersToNotify.get(zone) != null) {
View Full Code Here

Examples of com.tommytony.war.structure.ZoneLobby

      if (!(this.getSender() instanceof Player)) {
        return false;
      }
      zone = Warzone.getZoneByLocation((Player) this.getSender());
      if (zone == null) {
        ZoneLobby lobby = ZoneLobby.getLobbyByLocation((Player) this.getSender());
        if (lobby == null) {
          return false;
        }
        zone = lobby.getZone();
      }
    } else {
      return false;
    }
   
View Full Code Here

Examples of com.tommytony.war.structure.ZoneLobby

      if (this.getSender() instanceof Player) {
        player = (Player) commandSender;
        if (zone == null) {
          // zone not found, is he standing in it?
          Warzone zoneByLoc = Warzone.getZoneByLocation(player);
          ZoneLobby lobbyByLoc = ZoneLobby.getLobbyByLocation(player);
          if (zoneByLoc == null && lobbyByLoc != null) {
            zoneByLoc = lobbyByLoc.getZone();
          }
          if (zoneByLoc != null) {
            zone = zoneByLoc;
          }
        }
View Full Code Here

Examples of com.tommytony.war.structure.ZoneLobby

            lobbyVolume = VolumeMapper.loadVolume("lobby", warzone.getName(), lobbyWorld);
          } catch (SQLException e) {
            // if the zone is this old is there any reason the lobby should be nimitz format
            War.war.getLogger().log(Level.WARNING, "Failed to load lobby for a really old warzone", e);
          }
          ZoneLobby lobby = new ZoneLobby(warzone, lobbyFace, lobbyVolume);
          warzone.setLobby(lobby);
        }
      }

      return warzone;
View Full Code Here

Examples of com.tommytony.war.structure.ZoneLobby

      if (!(this.getSender() instanceof Player)) {
        return false;
      }
      zone = Warzone.getZoneByLocation((Player) this.getSender());
      if (zone == null) {
        ZoneLobby lobby = ZoneLobby.getLobbyByLocation((Player) this.getSender());
        if (lobby == null) {
          return false;
        }
        zone = lobby.getZone();
      }
    } else {
      return false;
    }
    if (zone == null) {
View Full Code Here

Examples of com.tommytony.war.structure.ZoneLobby

      zone = Warzone.getZoneByName(this.args[0]);
      kind = TeamKind.teamKindFromString(this.args[1]);
    } else if (this.args.length == 1) {
      zone = Warzone.getZoneByLocation((Player) this.getSender());
      if (zone == null) {
        ZoneLobby lobby = ZoneLobby.getLobbyByLocation((Player) this.getSender());
        if (lobby == null) {
          return false;
        }
        zone = lobby.getZone();
      }
      kind = TeamKind.teamKindFromString(this.args[0]);
    } else {
      return false;
    }
View Full Code Here

Examples of com.tommytony.war.structure.ZoneLobby

      try {
        lobbyVolume = warzone.loadStructure("lobby", lobbyWorld, connection);
      } catch (SQLException e) {
        War.war.getLogger().log(Level.WARNING, "Failed to load warzone lobby", e);
      }
      ZoneLobby lobby = new ZoneLobby(warzone, lobbyFace, lobbyVolume);
      warzone.setLobby(lobby);
     
      // warzone materials
      if (warzoneRootSection.isItemStack(zoneInfoPrefix + "materials.main")) {
        warzone.getWarzoneMaterials().setMainBlock(
View Full Code Here

Examples of com.tommytony.war.structure.ZoneLobby

        }
      }
    }
   
    Warzone locZone = Warzone.getZoneByLocation(playerLoc);
    ZoneLobby locLobby = ZoneLobby.getLobbyByLocation(playerLoc);

    boolean isMaker = War.war.isZoneMaker(player);

    // Zone walls
    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);
      }
    }

    if (!protecting) {
      // zone makers still need to delete their walls
      // make sure to delete any wall guards as you leave
      for (Warzone zone : War.war.getWarzones()) {
        zone.dropZoneWallGuardIfAny(player);
      }
    }

    // Warzone lobby gates
    if (locLobby != null && currentTeam == null && locLobby.isInAnyGate(playerLoc)) {
      Warzone zone = locLobby.getZone();
      Team locTeamGate = locLobby.getTeamGate(playerLoc);
      if (zone.getWarzoneConfig().getBoolean(WarzoneConfig.DISABLED) || zone.isReinitializing()) {
        War.war.badMsg(player, "join.disabled");
        event.setTo(zone.getTeleport());
      } else if (!zone.getWarzoneConfig().getBoolean(WarzoneConfig.JOINMIDBATTLE) && zone.isEnoughPlayers()) {
        War.war.badMsg(player, "join.progress");
        event.setTo(zone.getTeleport());
      } else if (zone.isFull()) {
        War.war.badMsg(player, "join.full.all");
        event.setTo(zone.getTeleport());
      } else if (zone.isFull(player)) {
        War.war.badMsg(player, "join.permission.all");
        event.setTo(zone.getTeleport());
      } else if (locTeamGate != null && locTeamGate.isFull()) {
        War.war.badMsg(player, "join.full.single", locTeamGate.getName());
        event.setTo(zone.getTeleport());
      } else if (locTeamGate != null && !War.war.canPlayWar(player, locTeamGate)) {
        War.war.badMsg(player, "join.permission.single", locTeamGate.getName());
        event.setTo(zone.getTeleport());
      } else if (zone.getLobby().isAutoAssignGate(playerLoc)) {
        zone.autoAssign(player);
      } else if (locTeamGate != null) {
        zone.assign(player, locTeamGate);
      }
      return;
    } else if (locLobby != null && currentTeam == null
        && locLobby.isInWarHubLinkGate(playerLoc)
        && War.war.getWarHub() != null) {
      War.war.msg(player, "warhub.teleport");
      event.setTo(War.war.getWarHub().getLocation());
      return;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.