Fix for inventory failure.

This commit is contained in:
Jonathan Williams 2015-10-19 01:32:12 -05:00
parent 9e7629b1fe
commit 5e307da15a
3 changed files with 1 additions and 7 deletions

View File

@ -31,7 +31,7 @@ public class BenefitManager extends MiniDbClientPlugin<BenefitData>
//_benefits.add(new Christmas2014(plugin, _repository, inventoryManager)); //_benefits.add(new Christmas2014(plugin, _repository, inventoryManager));
//_benefits.add(new Thanksgiving2014(plugin, _repository, inventoryManager)); //_benefits.add(new Thanksgiving2014(plugin, _repository, inventoryManager));
//_benefits.add(new Players40k(this, _repository, inventoryManager)); _benefits.add(new Players43k(this, _repository, inventoryManager));
} }
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)

View File

@ -110,7 +110,6 @@ public class PetTagPage extends ShopPageBase<CosmeticManager, CosmeticShop>
getPlugin().getPetManager().Get(getPlayer()).GetPets().put(_pet.GetPetType(), token.PetName); getPlugin().getPetManager().Get(getPlayer()).GetPets().put(_pet.GetPetType(), token.PetName);
getPlugin().getInventoryManager().addItemToInventory(null, getPlayer(), _pet.GetPetType().toString(), 1);
getShop().openPageForPlayer(getPlayer(), new Menu(getPlugin(), getShop(), getClientManager(), getDonationManager(), getPlayer())); getShop().openPageForPlayer(getPlayer(), new Menu(getPlugin(), getShop(), getClientManager(), getDonationManager(), getPlayer()));
} }
}, null, _petPurchase ? _pet : tag, CurrencyType.Coins, getPlayer())); }, null, _petPurchase ? _pet : tag, CurrencyType.Coins, getPlayer()));

View File

@ -89,11 +89,6 @@ public class InventoryManager extends MiniDbClientPlugin<ClientInventory>
if (!success) if (!success)
{ {
System.out.println("Add item to Inventory FAILED for " + player.getName()); System.out.println("Add item to Inventory FAILED for " + player.getName());
if (_items.containsKey(item))
{
Get(player).addItem(new ClientItem(_items.get(item), -count));
}
} }
if (callback != null) if (callback != null)