void loadItemsIntoSlots(final Player player){
  final String[] slotsItems={"bag","rhand","lhand","head","armor","legs","feet","finger","cloak","back","belt","keyring","trade"};
  try {
    for (    final String slotName : slotsItems) {
      if (!player.hasSlot(slotName)) {
        continue;
      }
      final RPSlot slot=player.getSlot(slotName);
      final PlayerSlot newSlot;
      if (slotName.equals("keyring")) {
        newSlot=new PlayerKeyringSlot(slotName);
      }
 else       if (slotName.equals("trade")) {
        newSlot=new PlayerTradeSlot(slotName);
      }
 else {
        newSlot=new PlayerSlot(slotName);
      }
      loadSlotContent(player,slot,newSlot);
    }
    for (    final Banks bank : Banks.values()) {
      final RPSlot slot=player.getSlot(bank.getSlotName());
      final PlayerSlot newSlot=new BankSlot(bank);
      loadSlotContent(player,slot,newSlot);
    }
  }
 catch (  final RuntimeException e) {
    logger.error("cannot create player",e);
  }
}

void loadItemsIntoSlots ( final Player player ) { final String [ ] slotsItems = { "bag" , "rhand" , "lhand" , "head" , "armor" , "legs" , "feet" , "finger" , "cloak" , "back" , "belt" , "keyring" , "trade" } ; try { for ( final String slotName : slotsItems ) { if ( ! player . hasSlot ( slotName ) ) { continue ; } final RPSlot slot = player . getSlot ( slotName ) ; final PlayerSlot newSlot ; if ( slotName . equals ( "keyring" ) ) { newSlot = new PlayerKeyringSlot ( slotName ) ; } else if ( slotName . equals ( "trade" ) ) { newSlot = new PlayerTradeSlot ( slotName ) ; } else { newSlot = new PlayerSlot ( slotName ) ; } loadSlotContent ( player , slot , newSlot ) ; } for ( final Banks bank : Banks . values ( ) ) { final RPSlot slot = player . getSlot ( bank . getSlotName ( ) ) ; final PlayerSlot newSlot = new BankSlot ( bank ) ; loadSlotContent ( player , slot , newSlot ) ; } } catch ( final RuntimeException e ) { logger . error ( "cannot create player" , e ) ; } }
loads the items into the slots of the player on login .
