Update UpgradesMenu.java
This commit is contained in:
parent
e7b43febac
commit
bc953fa2b5
@ -55,6 +55,8 @@ public class UpgradesMenu extends Menu {
|
||||
|
||||
Game game = this.main.getGameManager().getGameFromUUID(player.getUniqueId());
|
||||
|
||||
GameTeam gameTeam = game.getTeamByName(playerData.getPlayerTeam().getName());
|
||||
|
||||
if (event.getView().getTitle().equalsIgnoreCase(CC.translate("&eUpgrades Menu"))) {
|
||||
for (UpgradeItem upgradeItem : this.upgradeItems) {
|
||||
if (upgradeItem.getItemStack(player, playerCurrentGameData).getItemMeta().getDisplayName().equalsIgnoreCase(event.getCurrentItem().getItemMeta().getDisplayName())) {
|
||||
@ -65,7 +67,7 @@ public class UpgradesMenu extends Menu {
|
||||
}
|
||||
|
||||
if (upgradeItem.canBuy(player, playerCurrentGameData.getLevelForUpgrade(upgradeItem.getUpgrade()) + 1)) {
|
||||
upgradeItem.buy(player, playerCurrentGameData.getLevelForUpgrade(upgradeItem.getUpgrade()) + 1, game, game.getTeams().get(playerCurrentGameData.getTeamId()), playerCurrentGameData);
|
||||
upgradeItem.buy(player, playerCurrentGameData.getLevelForUpgrade(upgradeItem.getUpgrade()) + 1, game, gameTeam, playerCurrentGameData);
|
||||
|
||||
player.updateInventory();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user