Fix items added via support server not showing up in customer service logs

This commit is contained in:
AlexTheCoder 2016-09-05 20:25:02 -04:00
parent ffb6073532
commit a124aa3d85

View File

@ -50,6 +50,10 @@ public class ItemCommand extends CommandBase<SalesPackageManager>
final UUID uuid = Plugin.getClientManager().loadUUIDFromDB(playerName); final UUID uuid = Plugin.getClientManager().loadUUIDFromDB(playerName);
if (uuid != null) if (uuid != null)
{
Plugin.getDonationManager().PurchaseUnknownSalesPackage(new Callback<TransactionResponse>()
{
public void run(TransactionResponse data)
{ {
if (category.equalsIgnoreCase("ITEM")) if (category.equalsIgnoreCase("ITEM"))
{ {
@ -69,10 +73,6 @@ public class ItemCommand extends CommandBase<SalesPackageManager>
}, uuid, itemName, amount); }, uuid, itemName, amount);
} }
else else
{
Plugin.getDonationManager().PurchaseUnknownSalesPackage(new Callback<TransactionResponse>()
{
public void run(TransactionResponse data)
{ {
if (data == TransactionResponse.Success || data == TransactionResponse.AlreadyOwns) if (data == TransactionResponse.Success || data == TransactionResponse.AlreadyOwns)
{ {
@ -83,8 +83,8 @@ public class ItemCommand extends CommandBase<SalesPackageManager>
UtilPlayer.message(caller, F.main(Plugin.getName(), "ERROR processing " + playerName + " " + amount + " " + itemName + ".")); 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 else
caller.sendMessage(F.main(Plugin.getName(), "Couldn't find " + playerName + "'s account!")); caller.sendMessage(F.main(Plugin.getName(), "Couldn't find " + playerName + "'s account!"));