Package simpleserver.config.GiveAliasList

Examples of simpleserver.config.GiveAliasList.Suggestion


      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;
          }
          item = target.getServer().giveAliasList.getItemId(suggestion.name);
View Full Code Here


          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;
            }
          } else {
            id = itemAlias.id;
View Full Code Here

TOP

Related Classes of simpleserver.config.GiveAliasList.Suggestion

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.