diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/ItemCommand.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/ItemCommand.java index e10af1a64..1efa6afbe 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/ItemCommand.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/command/ItemCommand.java @@ -51,28 +51,28 @@ public class ItemCommand extends CommandBase if (uuid != null) { - if (category.equalsIgnoreCase("ITEM")) + Plugin.getDonationManager().PurchaseUnknownSalesPackage(new Callback() { - Plugin.getInventoryManager().addItemToInventoryForOffline(new Callback() + public void run(TransactionResponse data) { - public void run(Boolean success) + if (category.equalsIgnoreCase("ITEM")) { - if (success) + Plugin.getInventoryManager().addItemToInventoryForOffline(new Callback() { - UtilPlayer.message(caller, F.main(Plugin.getName(), playerName + " received " + amount + " " + itemName + ".")); - } - else - { - UtilPlayer.message(caller, F.main(Plugin.getName(), "ERROR processing " + playerName + " " + amount + " " + itemName + ".")); - } + public void run(Boolean success) + { + if (success) + { + UtilPlayer.message(caller, F.main(Plugin.getName(), playerName + " received " + amount + " " + itemName + ".")); + } + else + { + UtilPlayer.message(caller, F.main(Plugin.getName(), "ERROR processing " + playerName + " " + amount + " " + itemName + ".")); + } + } + }, uuid, itemName, amount); } - }, uuid, itemName, amount); - } - else - { - Plugin.getDonationManager().PurchaseUnknownSalesPackage(new Callback() - { - public void run(TransactionResponse data) + else { if (data == TransactionResponse.Success || data == TransactionResponse.AlreadyOwns) { @@ -83,8 +83,8 @@ public class ItemCommand extends CommandBase UtilPlayer.message(caller, F.main(Plugin.getName(), "ERROR processing " + playerName + " " + amount + " " + itemName + ".")); } } - }, playerName, client.getAccountId(), (amount == 1 ? itemName : itemName + " " + amount), GlobalCurrency.GEM, 0, false); - } + } + }, playerName, client.getAccountId(), (amount == 1 ? itemName : itemName + " " + amount), GlobalCurrency.GEM, 0, false); } else caller.sendMessage(F.main(Plugin.getName(), "Couldn't find " + playerName + "'s account!"));