Package simpleserver.config.xml

Examples of simpleserver.config.xml.CommandConfig


        player.addTMessage(Color.RED, "No such command");
        return;
      }
      player.addMessage(command.getHelpText(prefix));

      CommandConfig config = player.getServer().config.commands.get(command.getName());
      if (config != null && config.aliases != null && !config.aliases.isEmpty()) {
        StringBuffer line = new StringBuffer();
        for (String alias : config.aliases) {
          line.append(commandPrefix());
          line.append(alias);
View Full Code Here


      lastCommand = message;
    }

    String commandName = message.split(" ")[0].substring(1).toLowerCase();
    String args = commandName.length() + 1 >= message.length() ? "" : message.substring(commandName.length() + 2);
    CommandConfig config = server.config.commands.getTopConfig(commandName);
    String originalName = config == null ? commandName : config.originalName;

    PlayerCommand command = server.resolvePlayerCommand(originalName, groupObject);

    if (config != null && !overridePermissions) {
View Full Code Here

  }

  @Override
  void convert(Attributes attributes, Stack<PermissionContainer> stack) throws SAXException {
    PermissionContainer container = stack.peek();
    CommandConfig config = new CommandConfig(attributes.getValue("name"));
    config.fullInit();
    config.allow = new Permission(attributes.getValue("allow"), attributes.getValue("disallow"));
    if (attributes.getIndex("aliases") >= 0) {
      String[] aliases = attributes.getValue("aliases").split(",");
      config.aliases = new ArrayList<String>(aliases.length);
      for (String alias : aliases) {
View Full Code Here

    // 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.config.xml.CommandConfig

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.