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

      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)) {
        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 = (Player) commandSender;

      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

      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)) {
        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

      return false;
    }
    Player player = (Player) this.getSender();
    Warzone zone = Warzone.getZoneByLocation((Player) this.getSender());
    if (zone == null) {
      ZoneLobby lobby = ZoneLobby.getLobbyByLocation((Player) this.getSender());
      if (lobby != null) {
        zone = lobby.getZone();
      }
    }

    if (zone == null) {
      // Zone not where player is standing, maybe player is detaching/relocating the lobby
      Warzone givenWarzone = Warzone.getZoneByName(this.args[0]);
      if (givenWarzone == null) {
        return false;
      } else if (!this.isSenderAuthorOfZone(givenWarzone)) {
        return true;
      } else {
        // Move the warzone lobby
        ZoneLobby lobby = givenWarzone.getLobby();
        if (lobby != null) {
          // reset existing lobby and save new volume at new location
          lobby.setLocation(player.getLocation());
          lobby.initialize();
          this.msg("Warzone lobby moved to your location.");
        } else {
          // new lobby
          lobby = new ZoneLobby(givenWarzone, player.getLocation());
          givenWarzone.setLobby(lobby);
          lobby.initialize();
          if (War.war.getWarHub() != null) { // warhub has to change
            War.war.getWarHub().getVolume().resetBlocks();
            War.war.getWarHub().initialize();
          }
          this.msg("Warzone lobby moved to your location.");
        }
        WarzoneYmlMapper.save(givenWarzone);
      }
    } else if (!this.isSenderAuthorOfZone(zone)) {
      return true;
    } else {
      // Inside a warzone: use the classic n/s/e/w mode
      if (!this.args[0].equals("north") && !this.args[0].equals("n") && !this.args[0].equals("east") && !this.args[0].equals("e") && !this.args[0].equals("south") && !this.args[0].equals("s") && !this.args[0].equals("west") && !this.args[0].equals("w")) {
        return false;
      }
      ZoneLobby lobby = zone.getLobby();

      BlockFace wall = Direction.WEST();
      String wallStr = "";
      if (this.args[0].equals("north") || this.args[0].equals("n")) {
        wall = Direction.NORTH();
        wallStr = "north";
      } else if (this.args[0].equals("east") || this.args[0].equals("e")) {
        wall = Direction.EAST();
        wallStr = "east";
      } else if (this.args[0].equals("south") || this.args[0].equals("s")) {
        wall = Direction.SOUTH();
        wallStr = "south";
      } else if (this.args[0].equals("west") || this.args[0].equals("w")) {
        wall = Direction.WEST();
        wallStr = "west";
      }

      if (lobby != null) {
        // reset existing lobby
        lobby.getVolume().resetBlocks();
        lobby.setWall(wall);
        lobby.initialize();
        this.msg("Warzone lobby moved to " + wallStr + " side of zone.");
      } else {
        // new lobby
        lobby = new ZoneLobby(zone, wall);
        zone.setLobby(lobby);
        lobby.initialize();
        if (War.war.getWarHub() != null) { // warhub has to change
          War.war.getWarHub().getVolume().resetBlocks();
          War.war.getWarHub().initialize();
        }
        this.msg("Warzone lobby created on " + wallStr + "side of zone.");
View Full Code Here

Examples of com.tommytony.war.structure.ZoneLobby

        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

      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)) {
        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
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.