Refresh all player's pages when an item is purchased
This commit is contained in:
parent
ed7472f0c4
commit
43867a7018
@ -263,7 +263,13 @@ public class CakeResourcePage extends ShopPageBase<ArcadeManager, CakeResourceSh
|
||||
|
||||
player.sendMessage(F.main("Game", "You purchased " + F.name(getItemName(giveItem))) + ".");
|
||||
playAcceptSound(player);
|
||||
refresh();
|
||||
getShop().getPageMap().values().forEach(page ->
|
||||
{
|
||||
if (page.getName().equals(getName()))
|
||||
{
|
||||
page.refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import mineplex.core.shop.page.ShopPageBase;
|
||||
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.games.cakewars.shop.CakeItem;
|
||||
@ -174,7 +175,13 @@ public class CakeResourceStarPage extends CakeResourcePage
|
||||
}
|
||||
|
||||
playAcceptSound(player);
|
||||
refresh();
|
||||
getShop().getPageMap().values().forEach(page ->
|
||||
{
|
||||
if (page.getName().equals(getName()))
|
||||
{
|
||||
page.refresh();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user