final String[] slotsItems = { "bag", "rhand", "lhand", "head", "armor",
"legs", "feet", "finger", "cloak", "keyring", "trade" };
try {
for (final String slotName : slotsItems) {
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);