public void createNewPlayerInventoryItems(Player player) { Inventory inventory = new Inventory(); inventory.name = player.name + "'s inventory"; inventory.playerId = player.id; DatabaseOperations.AddInventory(inventory); for (int i = 1; i <= 40; i++) { Inventory_Item inventoryitem = new Inventory_Item(); inventoryitem.inventoryId = inventory.id; inventoryitem.slotId = i; inventoryitem.itemId = 1; inventoryitem.count = 0; DatabaseOperations.AddPlayerInventoryItem(inventoryitem); } }