From 4d3a5e87560738d75fe87d206d3c96d5765202b7 Mon Sep 17 00:00:00 2001 From: ArcticZeroo Date: Tue, 9 Jan 2018 19:29:01 -0500 Subject: [PATCH] Use ClientInventory#addItem --- .../src/mineplex/staffServer/ui/SupportPage.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/SupportPage.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/SupportPage.java index 07cc1c914..4f51ba7eb 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/SupportPage.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/SupportPage.java @@ -22,6 +22,8 @@ import mineplex.core.common.util.UtilSkull; import mineplex.core.common.util.UtilText; import mineplex.core.donation.Donor; import mineplex.core.donation.repository.token.TransactionToken; +import mineplex.core.inventory.ClientInventory; +import mineplex.core.inventory.ClientItem; import mineplex.core.server.util.TransactionResponse; import mineplex.core.shop.item.ShopItem; import mineplex.core.shop.page.ShopPageBase; @@ -167,7 +169,9 @@ public class SupportPage extends ShopPageBase private void addItemsToClient(int amount, String itemName) { - getPlugin().getInventoryManager().Get(_target.getUniqueId()).getClientItem(itemName).Count += amount; + ClientInventory clientInventory = getPlugin().getInventoryManager().Get(_target.getUniqueId()); + + clientInventory.addItem(new ClientItem(getPlugin().getInventoryManager().getItem(itemName), amount)); } protected void giveUnknownSalesPackage(int amount, String itemName, boolean isItem, Consumercallback)