public EquipRandomItemAction(final String itemlist,final boolean bind){
  String[] elements=itemlist.split(";");
  if (elements.length == 1) {
    logger.warn("Using random item function for one item? List: " + itemlist);
  }
  for (  String element : elements) {
    String[] subelements=element.split("=");
    String itemname=subelements[0];
    Integer amount=1;
    try {
      amount=Integer.parseInt(subelements[1]);
    }
 catch (    ArrayIndexOutOfBoundsException ex) {
      logger.error("Bad format for list " + itemlist);
    }
catch (    NumberFormatException ex) {
      logger.error("Bad number " + subelements[1] + " for entry "+ subelements[0]+ " in list "+ itemlist);
    }
    items.put(itemname,amount);
  }
  this.bind=bind;
}

public EquipRandomItemAction ( final String itemlist , final boolean bind ) { String [ ] elements = itemlist . split ( ";" ) ; if ( elements . length == 1 ) { logger . warn ( "Using random item function for one item? List: " + itemlist ) ; } for ( String element : elements ) { String [ ] subelements = element . split ( "=" ) ; String itemname = subelements [ 0 ] ; Integer amount = 1 ; try { amount = Integer . parseInt ( subelements [ 1 ] ) ; } catch ( ArrayIndexOutOfBoundsException ex ) { logger . error ( "Bad format for list " + itemlist ) ; } catch ( NumberFormatException ex ) { logger . error ( "Bad number " + subelements [ 1 ] + " for entry " + subelements [ 0 ] + " in list " + itemlist ) ; } items . put ( itemname , amount ) ; } this . bind = bind ; }
creates a new equiprandomitemaction .
