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

@ -51,28 +51,28 @@ public class ItemCommand extends CommandBase<SalesPackageManager>
if (uuid != null) if (uuid != null)
{ {
if (category.equalsIgnoreCase("ITEM")) Plugin.getDonationManager().PurchaseUnknownSalesPackage(new Callback<TransactionResponse>()
{ {
Plugin.getInventoryManager().addItemToInventoryForOffline(new Callback<Boolean>() public void run(TransactionResponse data)
{ {
public void run(Boolean success) if (category.equalsIgnoreCase("ITEM"))
{ {
if (success) Plugin.getInventoryManager().addItemToInventoryForOffline(new Callback<Boolean>()
{ {
UtilPlayer.message(caller, F.main(Plugin.getName(), playerName + " received " + amount + " " + itemName + ".")); public void run(Boolean success)
} {
else if (success)
{ {
UtilPlayer.message(caller, F.main(Plugin.getName(), "ERROR processing " + playerName + " " + amount + " " + itemName + ".")); 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
}
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!"));