示例#1
0
  /**
   * ********************************************************** getPos()
   * **********************************************************
   */
  public void getPos(Player player, Command cmd, String label, String[] args) {
    Location loc = player.getLocation();
    World world = loc.getWorld();
    Chunk chunk = loc.getChunk();

    this.plugin.chat.info(player, "World  : " + world.getName());
    this.plugin.chat.info(player, "Chunk  : x=" + chunk.getX() + " z=" + chunk.getZ());
    this.plugin.chat.info(
        player,
        "Coords : x=" + loc.getBlockX() + " y=" + loc.getBlockY() + " z=" + loc.getBlockZ());
  }
示例#2
0
  /**
   * ********************************************************** setPos1()
   * **********************************************************
   */
  public void setPos1(Player player, Command cmd, String label, String[] args) {
    this.pos1 = player.getLocation();

    this.plugin.chat.info(
        player,
        "Position 1 set to : "
            + "x="
            + this.pos1.getBlockX()
            + " y="
            + this.pos1.getBlockY()
            + " z="
            + this.pos1.getBlockZ());
  }