Package com.tommytony.war.volume

Examples of com.tommytony.war.volume.Volume


  public Cake(String name, Warzone warzone, Location location) {
    this.name = name;
    this.location = location;
    this.warzone = warzone;
    this.volume = new Volume("cake-" + name, warzone.getWorld());
    this.setLocation(location);
  }
View Full Code Here


    this.setLocation(location);
  }

  public void addCakeBlocks() {
    // make air (old two-high above floor)
    Volume airGap = new Volume(new Location(this.volume.getWorld(),
        this.volume.getCornerOne().getX(), this.volume.getCornerOne()
            .getY() + 1, this.volume.getCornerOne().getZ()),
        new Location(this.volume.getWorld(), this.volume.getCornerTwo()
            .getX(), this.volume.getCornerOne().getY() + 2,
            this.volume.getCornerTwo().getZ()));
    airGap.setToMaterial(Material.AIR);
   
    int x = this.location.getBlockX();
    int y = this.location.getBlockY();
    int z = this.location.getBlockZ();
View Full Code Here

  public boolean isOpponentSpawnPeripheryBlock(Team team, Block block) {
    for (Team maybeOpponent : this.getTeams()) {
      if (maybeOpponent != team) {
        for (Volume teamSpawnVolume : maybeOpponent.getSpawnVolumes().values()) {
          Volume periphery = new Volume(new Location(
              teamSpawnVolume.getWorld(),
              teamSpawnVolume.getMinX() - 1,
              teamSpawnVolume.getMinY() - 1,
              teamSpawnVolume.getMinZ() - 1), new Location(
              teamSpawnVolume.getWorld(),
              teamSpawnVolume.getMaxX() + 1,
              teamSpawnVolume.getMaxY() + 1,
              teamSpawnVolume.getMaxZ() + 1));
          if (periphery.contains(block)) {
            return true;
          }
        }
      }
    }
View Full Code Here

  public Volume loadStructure(String volName, Connection zoneConnection) throws SQLException {
    return loadStructure(volName, world, zoneConnection);
  }

  public Volume loadStructure(String volName, World world, Connection zoneConnection) throws SQLException {
    Volume volume = new Volume(volName, world);
    if (!containsTable(String.format("structure_%d_corners", volName.hashCode() & Integer.MAX_VALUE), zoneConnection)) {
      volume = VolumeMapper.loadVolume(volName, name, world);
      ZoneVolumeMapper.saveStructure(volume, zoneConnection);
      War.war.getLogger().log(Level.INFO, "Stuffed structure {0} into database for warzone {1}", new Object[] {volName, name});
      return volume;
View Full Code Here

  public Monument(String name, Warzone warzone, Location location) {
    this.name = name;
    this.location = location;
    this.warzone = warzone;
    this.volume = new Volume(name, warzone.getWorld());
    this.setLocation(location);
  }
View Full Code Here

    this.setLocation(location);
  }

  public void addMonumentBlocks() {
    // make air (old three-high above floor)
    Volume airGap = new Volume(new Location(this.volume.getWorld(),
        this.volume.getCornerOne().getX(), this.volume.getCornerOne()
            .getY() + 1, this.volume.getCornerOne().getZ()),
        new Location(this.volume.getWorld(), this.volume.getCornerTwo()
            .getX(), this.volume.getCornerOne().getY() + 3,
            this.volume.getCornerTwo().getZ()));
    airGap.setToMaterial(Material.AIR);

    this.ownerTeam = null;
    int x = this.location.getBlockX();
    int y = this.location.getBlockY();
    int z = this.location.getBlockZ();
View Full Code Here

    World world = War.war.getServer().getWorld(worldName);
    if (world != null) {
      Location hubLocation = new Location(world, hubX, hubY, hubZ);
      WarHub hub = new WarHub(hubLocation, hubOrientation);
      War.war.setWarHub(hub);
      Volume vol;
      try {
        vol = VolumeMapper.loadVolume("warhub", "", world);
      } catch (SQLException e) {
        throw new RuntimeException(e);
      }
View Full Code Here

    }
    if (world != null) {
      Location hubLocation = new Location(world, hubX, hubY, hubZ);
      WarHub hub = new WarHub(hubLocation, hubOrientation);
      War.war.setWarHub(hub);
      Volume vol;
      try {
        vol = VolumeMapper.loadVolume("warhub", "", world);
      } catch (SQLException e) {
        throw new RuntimeException(e);
      }
View Full Code Here

    this.location = new Location(location.getWorld(),
                location.getX(),
                location.getY(),
                location.getZ(),
                yaw, 0);
    this.volume = new Volume("warhub", location.getWorld());
  }
View Full Code Here

  }

  // Use when creating from player location (with yaw)
  public WarHub(Location location) {
    this.location = location;
    this.volume = new Volume("warhub", location.getWorld());

    this.setLocation(location);
  }
View Full Code Here

TOP

Related Classes of com.tommytony.war.volume.Volume

Copyright © 2018 www.massapicom. 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.