Requested PR changes

This commit is contained in:
Spencer 2018-01-07 09:03:08 -05:00 committed by Alexander Meech
parent e7b67ae7d6
commit d10920329d
5 changed files with 17 additions and 12 deletions

View File

@ -37,8 +37,6 @@ public class SupportPage extends ShopPageBase<CustomerSupport, SupportShop>
{
super(plugin, shop, plugin.getClientManager(), plugin.getDonationManager(), name + " - " + target.getName(), player);
assert name.length() < 13;
_target = target;
_donor = getPlugin().getDonationManager().Get(_target.getUniqueId());
_previousPage = previousPage;

View File

@ -44,11 +44,13 @@ public class SupportShop extends ShopBase<CustomerSupport>
// Who cares if they fail to load, the barrier
// button will just be there since the HomePage
// knows not to put it in.
UtilServer.runAsync(() ->
loadBonusLog(caller, target.getAccountId(), (bS) ->
loadPowerPlay(caller, target.getAccountId(), (ppcS) ->
loadPetClient(caller, target, (petS) ->
loadBonusData(caller, target.getAccountId(), (bonusS) ->
openPageForPlayer(caller, new SupportHomePage(getPlugin(), this, caller, target))
UtilServer.runSync(() -> openPageForPlayer(caller, new SupportHomePage(getPlugin(), this, caller, target)))
)
)
)
)

View File

@ -31,7 +31,8 @@ public class SupportCurrencyPage extends SupportPage
addButton(slot,
new ShopItem(currency.getDisplayMaterial(), currency.getColor() + C.Bold + currency.getString(amount, false), new String[] {C.mBody + "Click to award " + currency.getString(amount) }, i + 1, false, true),
(p, c) -> getPlugin().getDonationManager().rewardCurrency(currency, _target, "Support - " + getPlayer().getName(), amount, true, (success) -> {
(p, c) -> getPlugin().getDonationManager().rewardCurrency(currency, _target, "Support - " + getPlayer().getName(), amount, true, (success) ->
{
if (success)
{
playSuccess();

View File

@ -44,7 +44,8 @@ public abstract class SupportGiveItemPage extends SupportPage
{
addButton(minusSlot,
new ShopItem(Material.ARROW, "-1", new String[0], 1, false, true),
(p, c) -> {
(p, c) ->
{
_count--;
refresh();
});
@ -59,7 +60,8 @@ public abstract class SupportGiveItemPage extends SupportPage
{
addButton(plusSlot,
new ShopItem(Material.ARROW, "+1", new String[0], 1, false, true),
(p, c) -> {
(p, c) ->
{
_count++;
refresh();
});

View File

@ -105,7 +105,8 @@ public class SupportRankListPage extends SupportPage
return;
}
getPlugin().getClientManager().setPrimaryGroup(_target.getAccountId(), group, () -> {
getPlugin().getClientManager().setPrimaryGroup(_target.getAccountId(), group, () ->
{
message("You have applied the rank " + group.getDisplay(true, true, true, true).toUpperCase() + C.mBody + " to " + C.cYellow + _target.getName());
_target.setPrimaryGroup(group);
refresh();
@ -122,7 +123,8 @@ public class SupportRankListPage extends SupportPage
{
for (Pair<TreasureType, Integer> reward : _rankBonusItems.get(group))
{
getPlugin().getInventoryManager().addItemToInventoryForOffline((success) -> {
getPlugin().getInventoryManager().addItemToInventoryForOffline((success) ->
{
if (success)
{
_player.sendMessage(F.main(getPlugin().getName(), "You gave " + C.cYellow + reward.getRight() + " " + reward.getLeft().getItemName() + C.mBody + " to " + C.cYellow + _target.getName()));