private List<Item> moveItemsFromSlotToList(RPSlot slot){
  List<Item> items=new LinkedList<Item>();
  for (  RPObject item : slot) {
    if (item instanceof Item) {
      items.add((Item)item);
    }
  }
  slot.clear();
  return items;
}

private List < Item > moveItemsFromSlotToList ( RPSlot slot ) { List < Item > items = new LinkedList < Item > ( ) ; for ( RPObject item : slot ) { if ( item instanceof Item ) { items . add ( ( Item ) item ) ; } } slot . clear ( ) ; return items ; }
moves all items from a slot to a list , clearing the slot in the end
