Package simpleserver.config.GiveAliasList

Examples of simpleserver.config.GiveAliasList.Item


      String[] request = arguments[0].split(":");
      if (request[0].matches("\\d+")) {
        id = Integer.valueOf(request[0]);
      } else {
        Item item = target.getServer().giveAliasList.getItemId(request[0]);
        if (item == null) {
          Suggestion suggestion = target.getServer().giveAliasList.findWithLevenshtein(request[0]);
          if (suggestion.distance > 4 || suggestion.distance * 2 > request[0].length()) {
            tError("Can't find item %s", request[0]);
            return;
View Full Code Here


      if (parts.length == 2) {
        try {
          id = Integer.valueOf(parts[1]);
        } catch (NumberFormatException e) {
          GiveAliasList alias = player.getServer().giveAliasList;
          Item itemAlias = alias.getItemId(parts[1]);
          if (itemAlias == null) {
            Suggestion correctName = alias.findWithLevenshtein(parts[1]);
            if (correctName.distance < 4) {
              id = alias.getItemId(correctName.name).id;
            }
View Full Code Here

    push(alias);
  }

  private void alias2id() {
    String alias = pop();
    Item i = e.server.giveAliasList.getItemId(alias);
    if (i != null) {
      String id = String.valueOf(i.id);
      if (i.damage != 0) {
        id += ":" + String.valueOf(i.damage);
      }
View Full Code Here

TOP

Related Classes of simpleserver.config.GiveAliasList.Item

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.