Package forestry.api.arboriculture

Examples of forestry.api.arboriculture.ITreekeepingMode


        throw new WrongUsageException("/" + this.getCommandName() + " set [<world-#>] <mode-name>");

      World world = getWorld(sender, arguments);
      String desired = arguments[arguments.length - 1];

      ITreekeepingMode mode = PluginArboriculture.treeInterface.getTreekeepingMode(desired);
      if (mode == null)
        throw new CommandException(StringUtil.localize("chat.trees.command.treekeeping.error"), desired);

      PluginArboriculture.treeInterface.setTreekeepingMode(world, mode.getName());
      func_152373_a(sender, this, StringUtil.localize("chat.trees.command.treekeeping.set"), mode.getName());

    } else if (arguments[0].matches("save")) {
      if (arguments.length <= 1)
        throw new WrongUsageException("/" + this.getCommandName() + " save <player-name>");
View Full Code Here


  private void listModeInfo(ICommandSender sender, String[] arguments) {
    if (arguments.length <= 1)
      throw new WrongUsageException("/" + this.getCommandName() + " info <mode-name>");

    ITreekeepingMode found = null;
    for (ITreekeepingMode mode : PluginArboriculture.treeInterface.getTreekeepingModes())
      if (mode.getName().equalsIgnoreCase(arguments[1])) {
        found = mode;
        break;
      }

    if (found == null)
      throw new CommandException("No treekeeping mode called '%s' is available.", arguments[1]);

    sendChatMessage(sender, "\u00A7aMode: " + found.getName());
    for (String desc : found.getDescription())
      sendChatMessage(sender, StringUtil.localize(desc));
  }
View Full Code Here

TOP

Related Classes of forestry.api.arboriculture.ITreekeepingMode

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.