From a124aa3d852bd089d07a2e719126a1552c365131 Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Mon, 5 Sep 2016 20:25:02 -0400 Subject: [PATCH] Fix items added via support server not showing up in customer service logs --- .../salespackage/command/ItemCommand.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) 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!"));