Package simpleserver

Examples of simpleserver.Player$Warmup


  }

  private void isinarea() {
    String area = pop();
    String player = pop();
    Player p = e.server.findPlayer(player);
    if (p == null) {
      e.notifyError("isarea: Player not found!");
      push(false);
    }
    HashSet<Area> areas = new HashSet<Area>(e.server.config.dimensions.areas(p.position()));
    for (Area a : areas) {
      if (a.name.equals(area)) {
        push(true);
        return;
      }
View Full Code Here


    return;
  }

  private void getcoord() {
    String player = pop();
    Player p = e.server.findPlayer(player);
    if (p == null) {
      e.notifyError("isarea: Player not found!");
      push(false);
    }

    ArrayList<String> c = new ArrayList<String>();
    c.add(String.valueOf(p.position().x()));
    c.add(String.valueOf(p.position().y()));
    c.add(String.valueOf(p.position().z()));
    push(c);
  }
View Full Code Here

    if (tokens.size() < 2) {
      notifyError("Wrong number of arguments!");
      return;
    }

    Player p = server.findPlayer(tokens.remove(0));
    if (p == null) {
      notifyError("Player not found!");
      return;
    }

    String message = new PostfixEvaluator(this).evaluateSingle(tokens);
    p.addTMessage(message);
  }
View Full Code Here

    if (tokens.size() < 2) {
      notifyError("Wrong number of arguments!");
      return;
    }

    Player p = server.findPlayer(tokens.get(0));
    if (p == null) {
      notifyError("Source player not online!");
      return;
    }

    Coordinate c = null;

    String dest = tokens.get(1);

    // Try to find such a player
    Player q = server.findPlayer(dest);
    if (q != null) {
      c = q.position.coordinate();
    }

    // Try to find such an event
View Full Code Here

    if (tokens.size() == 0) {
      notifyError("Wrong number of arguments!");
      return; // no command to execute
    }

    Player p = server.findPlayer(tokens.remove(0));
    if (p == null) {
      notifyError("Player not found!");
      return;
    }

    String message = server.options.getBoolean("useSlashes") ? "/" : "!";
    for (String token : tokens) {
      message += token + " ";
    }
    message = message.substring(0, message.length() - 1);

    // execute the server command, overriding the player permissions
    p.parseCommand(message, true);

    // handle forwarding
    String cmd = tokens.get(0);
    PlayerCommand command = server.resolvePlayerCommand(cmd, p.getGroup());

    // forwarding if necessary
    CommandConfig config = server.config.commands.getTopConfig(cmd);
    if ((command instanceof ExternalCommand)
        || (config != null && config.forwarding != Forwarding.NONE)
        || server.config.properties.getBoolean("forwardAllCommands")) {
      p.forwardMessage(message);
    }

  }
View Full Code Here

TOP

Related Classes of simpleserver.Player$Warmup

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.