Examples of EntryNode


Examples of ch.njol.skript.config.EntryNode

 
  @Override
  public boolean validate(final Node node) {
    if (!super.validate(node))
      return false;
    final EntryNode n = (EntryNode) node;
    try {
      final E e = Enum.valueOf(enumType, n.getValue().toUpperCase().replace(' ', '_'));
      assert e != null;
//      if (setter != null)
      setter.set(e);
    } catch (final IllegalArgumentException e) {
      Skript.error("'" + n.getValue() + "' is not a valid value for '" + n.getKey() + "'" + (allowedValues == null ? "" : ". Allowed values are: " + allowedValues));
      return false;
    }
    return true;
  }
View Full Code Here

Examples of ch.njol.skript.config.EntryNode

              node = node.getParent();
            }
            if (params[1].isEmpty()) {
              ((SectionNode) node).getNodeList().add(node = new SectionNode(params[0], (SectionNode) node));
            } else {
              ((SectionNode) node).getNodeList().add(node = new EntryNode(params[0], params[1], (SectionNode) node));
            }
            sender.sendMessage("created & selected " + params[0]);
          } else if (action.equals("r") || action.equals("rename")) {
            if (actionParams.isEmpty()) {
              sender.sendMessage("usage: /s r new name");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.