Пример #1
0
  public void go() {
    if (!(this.sender instanceof Player)) return;

    Player p = (Player) this.sender;
    Map map = this.editor.getMap(p.getWorld());
    if (map == null) return;
    if (this.args.length == 1) return;
    if (!Utils.isInt(this.args[1])) return;
    int n = Integer.parseInt(this.args[1]);
    if (n < 1) return;
    Sign sign = map.getSign(n);

    if (sign == null) {
      message("Sign not found, check /editor find...");
      return;
    }

    p.teleport(sign.getRealLocation(p.getWorld()));
    message("Teleported to sign #" + n);
  }