Package logisticspipes.asm.wrapper

Examples of logisticspipes.asm.wrapper.AbstractWrapper


    }
    String name = args[0];
    List<AbstractWrapper> list = new ArrayList<AbstractWrapper>(LogisticsWrapperHandler.wrapperController);
    Iterator<AbstractWrapper> iter = list.iterator();
    while(iter.hasNext()) {
      AbstractWrapper item = iter.next();
      if(item.getState() != WrapperState.Exception) {
        iter.remove();
      }
    }
    iter = list.iterator();
    while(iter.hasNext()) {
      AbstractWrapper item = iter.next();
      if(!(item.getName() + item.getTypeName()).startsWith(name)) {
        iter.remove();
      }
    }
    if(list.size() > 1) {
      sender.addChatMessage(new ChatComponentText("Possible: "));
      for(AbstractWrapper can:list) {
        sender.addChatMessage(new ChatComponentText(can.getName() + can.getTypeName()));
      }
    } else if(list.isEmpty()) {
      sender.addChatMessage(new ChatComponentText("No match found"));
    } else {
      AbstractWrapper wrapper = list.get(0);
      wrapper.reEnable();
    }
  }
View Full Code Here


    }
    String name = args[0];
    List<AbstractWrapper> list = new ArrayList<AbstractWrapper>(LogisticsWrapperHandler.wrapperController);
    Iterator<AbstractWrapper> iter = list.iterator();
    while(iter.hasNext()) {
      AbstractWrapper item = iter.next();
      if(item.getState() != WrapperState.Exception) {
        iter.remove();
      }
    }
    iter = list.iterator();
    while(iter.hasNext()) {
      AbstractWrapper item = iter.next();
      if(!(item.getName() + item.getTypeName()).startsWith(name)) {
        iter.remove();
      }
    }
    if(list.size() > 1) {
      sender.addChatMessage(new ChatComponentText("Possible: "));
      for(AbstractWrapper can:list) {
        sender.addChatMessage(new ChatComponentText(can.getName() + can.getTypeName()));
      }
    } else if(list.isEmpty()) {
      sender.addChatMessage(new ChatComponentText("No match found"));
    } else {
      AbstractWrapper wrapper = list.get(0);
      Throwable t = wrapper.getReason();
      if(t == null) {
        sender.addChatMessage(new ChatComponentText("null"));
        return;
      } else {
        sender.addChatMessage(new ChatComponentText("-----------------------------------------------------"));
View Full Code Here

TOP

Related Classes of logisticspipes.asm.wrapper.AbstractWrapper

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.