Package com.bergerkiller.bukkit.tc.properties

Examples of com.bergerkiller.bukkit.tc.properties.IProperties


    }
    return offset;
  }

  public static boolean parseProperties(IParsable properties, String key, String args) {
    IProperties prop;
    IPropertiesHolder holder;
    if (properties instanceof IPropertiesHolder) {
      holder = ((IPropertiesHolder) properties);
      prop = holder.getProperties();
    } else if (properties instanceof IProperties) {
      prop = (IProperties) properties;
      holder = prop.getHolder();
    } else {
      return false;
    }
    if (holder == null) {
      return prop.parseSet(key, args);
    } else if (prop.parseSet(key, args) || holder.parseSet(key, args))  {
      holder.onPropertiesChanged();
      return true;
    } else {
      return false;
    }
View Full Code Here


    // Handle destination alternatively
    if (info.isAction(SignActionType.MEMBER_ENTER, SignActionType.GROUP_ENTER) && (facing || !info.isWatchedDirectionsDefined())) {
      PathNode node = PathNode.getOrCreate(info);
      if (node != null) {
        String destination = null;
        IProperties prop = null;
        if (doCart && info.hasMember()) {
          prop = info.getMember().getProperties();
        } else if (doTrain && info.hasGroup()) {
          prop = info.getGroup().getProperties();
        }
        if (prop != null) {
          destination = prop.getDestination();
          prop.setLastPathNode(node.getName());
        }
        // Continue with path finding if a valid destination is specified
        // If the current node denotes the destination - don't switch!
        if (!LogicUtil.nullOrEmpty(destination) && !node.containsName(destination)) {
          if (PathProvider.isProcessing()) {
View Full Code Here

      } else {
        Localization.EDIT_NOTALLOWED.message(player);
      }
      return true;
    }
    IProperties prop;
    if (info.isTrainSign()) {
      prop = cprop.getTrainProperties();
    } else if (info.isCartSign()) {
      prop = cprop;
    } else {
      return false;
    }
    if (!prop.hasOwnership(player)) {
      Localization.EDIT_NOTOWNED.message(player);
    } else {
      String dest = info.getLine(2);
      prop.setDestination(dest);
      Localization.SELECT_DESTINATION.message(player, dest);
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of com.bergerkiller.bukkit.tc.properties.IProperties

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.