Merge pull request #195 from Mineplex-LLC/update/emergency-support-fixes

Update/emergency support fixes
This commit is contained in:
Shaun Bennett 2016-09-07 07:57:53 -04:00 committed by GitHub
commit ba322f0df1

View File

@ -51,28 +51,28 @@ public class ItemCommand extends CommandBase<SalesPackageManager>
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 + "."));
}
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<TransactionResponse>()
{
public void run(TransactionResponse data)
else
{
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 + "."));
}
}
}, 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!"));