Package org.bukkit

Examples of org.bukkit.Location


    }
  }

  public void setNorthwest(Location block) throws NotNorthwestException, TooSmallException, TooBigException {
    // northwest defaults to top block
    Location topBlock = new Location(block.getWorld(), block.getX(), block.getWorld().getMaxHeight(), block.getZ());
    Location oldCornerOne = this.getCornerOne();
    Location oldCornerTwo = this.getCornerTwo();
    if (this.getCornerOne() == null) {
      if (this.getCornerTwo() == null) {
        // northwest defaults to corner 1
        super.setCornerOne(topBlock);
      } else if (this.getCornerTwo().getX() <= block.getX() || this.getCornerTwo().getZ() >= block.getZ()) {
View Full Code Here


    }
  }

  public void setSoutheast(Location block) throws NotSoutheastException, TooSmallException, TooBigException {
    // southeast defaults to bottom block
    Location bottomBlock = new Location(block.getWorld(), block.getX(), 0, block.getZ());
    Location oldCornerOne = this.getCornerOne();
    Location oldCornerTwo = this.getCornerTwo();
    if (this.getCornerTwo() == null) {
      if (this.getCornerOne() == null) {
        // southeast defaults to corner 2
        super.setCornerTwo(bottomBlock);
      } else if (this.getCornerOne().getX() >= block.getX() || this.getCornerOne().getZ() <= block.getZ()) {
View Full Code Here

      return this.getMinY() + (this.getMaxY() - this.getMinY()) / 2;
    }
  }

  public void setZoneCornerOne(Block block) throws TooSmallException, TooBigException {
    Location oldCornerOne = this.getCornerOne();
    super.setCornerOne(block);
    if (this.tooSmall() || this.zoneStructuresAreOutside()) {
      super.setCornerOne(oldCornerOne);
      throw new TooSmallException();
    } else if (this.tooBig()) {
View Full Code Here

      throw new TooBigException();
    }
  }

  public void setZoneCornerTwo(Block block) throws TooSmallException, TooBigException {
    Location oldCornerTwo = this.getCornerTwo();
    super.setCornerTwo(block);
    if (this.tooSmall() || this.zoneStructuresAreOutside()) {
      super.setCornerTwo(oldCornerTwo);
      throw new TooSmallException();
    } else if (this.tooBig()) {
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;
View Full Code Here

      } else if (this.wall == Direction.EAST()) {
        yaw = 0;
      } else if (this.wall == Direction.NORTH()) {
        yaw = 270;
      }
      this.warzone.setTeleport(new Location(this.volume.getWorld(), this.zoneTeleportBlock.getX(), this.zoneTeleportBlock.getY(), this.zoneTeleportBlock.getZ(), yaw, 0));

      // set to air the minimum path
      BlockFace front = this.wall;
      BlockFace leftSide = null; // looking at the zone
      BlockFace rightSide = null;
View Full Code Here

      }
    }
  }

  public boolean isInTeamGate(Team team, Location location) {
    Location info = this.teamGateBlocks.get(team.getName());
    if (info != null) {
      if (location.getBlockX() == info.getX() && location.getBlockY() == info.getY() && location.getBlockZ() == info.getZ()) {
        return true;
      }
    }
   
    return false;
View Full Code Here

  }

  public boolean blockIsAGateBlock(Block block, BlockFace blockWall) {
    if (blockWall == this.wall) {
      for (String teamName : this.teamGateBlocks.keySet()) {
        Location gateInfo = this.teamGateBlocks.get(teamName);
        if (this.isPartOfGate(gateInfo.getBlock(), block)) {
          return true;
        }
      }
     
      if (this.autoAssignGate != null && this.isPartOfGate(this.autoAssignGate.getBlock(), block)) {
View Full Code Here

  public Warzone getZone() {
    return this.warzone;
  }

  public void resetTeamGateSign(Team team) {
    Location info = this.teamGateBlocks.get(team.getName());
    if (info != null) {
      this.resetTeamGateSign(team, info.getBlock());
    }
  }
View Full Code Here

        return true;
      }
    }
    for (String teamName : this.teamGateBlocks.keySet()) {

      Location info = this.teamGateBlocks.get(teamName);
      if (this.leaving(location, info.getBlock(), inside, left, right)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

TOP

Related Classes of org.bukkit.Location

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.