Fixed.
This commit is contained in:
parent
bc953fa2b5
commit
248d378161
@ -12,7 +12,6 @@ import rip.tilly.bedwars.generators.Generator;
|
|||||||
import rip.tilly.bedwars.generators.GeneratorType;
|
import rip.tilly.bedwars.generators.GeneratorType;
|
||||||
import rip.tilly.bedwars.playerdata.PlayerData;
|
import rip.tilly.bedwars.playerdata.PlayerData;
|
||||||
import rip.tilly.bedwars.playerdata.PlayerState;
|
import rip.tilly.bedwars.playerdata.PlayerState;
|
||||||
import rip.tilly.bedwars.playerdata.currentgame.PlayerCurrentGameData;
|
|
||||||
import rip.tilly.bedwars.runnables.GameRunnable;
|
import rip.tilly.bedwars.runnables.GameRunnable;
|
||||||
import rip.tilly.bedwars.utils.CC;
|
import rip.tilly.bedwars.utils.CC;
|
||||||
import rip.tilly.bedwars.utils.CustomLocation;
|
import rip.tilly.bedwars.utils.CustomLocation;
|
||||||
@ -80,9 +79,6 @@ public class GameStartListener implements Listener {
|
|||||||
playerData.setTeamId(team.getId());
|
playerData.setTeamId(team.getId());
|
||||||
playerData.setPlayerTeam(team.getPlayerTeam());
|
playerData.setPlayerTeam(team.getPlayerTeam());
|
||||||
|
|
||||||
PlayerCurrentGameData playerCurrentGameData = playerData.getCurrentGameData();
|
|
||||||
playerCurrentGameData.setTeamId(team.getId());
|
|
||||||
|
|
||||||
playerData.setPlayerState(PlayerState.PLAYING);
|
playerData.setPlayerState(PlayerState.PLAYING);
|
||||||
|
|
||||||
CustomLocation locationA = game.getCopiedArena().getA();
|
CustomLocation locationA = game.getCopiedArena().getA();
|
||||||
|
@ -34,8 +34,6 @@ public class PlayerCurrentGameData {
|
|||||||
private int axeLevel = 0;
|
private int axeLevel = 0;
|
||||||
private boolean shears = false;
|
private boolean shears = false;
|
||||||
|
|
||||||
private int teamId;
|
|
||||||
|
|
||||||
private ArmorType armorType = ArmorType.LEATHER;
|
private ArmorType armorType = ArmorType.LEATHER;
|
||||||
|
|
||||||
private Map<UUID, ArmorType> armor = new HashMap<UUID, ArmorType>();
|
private Map<UUID, ArmorType> armor = new HashMap<UUID, ArmorType>();
|
||||||
|
@ -16,6 +16,7 @@ import rip.tilly.bedwars.utils.menusystem.PlayerMenuUtil;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class UpgradesMenu extends Menu {
|
public class UpgradesMenu extends Menu {
|
||||||
|
|
||||||
@ -53,9 +54,13 @@ public class UpgradesMenu extends Menu {
|
|||||||
|
|
||||||
PlayerCurrentGameData playerCurrentGameData = playerData.getCurrentGameData();
|
PlayerCurrentGameData playerCurrentGameData = playerData.getCurrentGameData();
|
||||||
|
|
||||||
Game game = this.main.getGameManager().getGameFromUUID(player.getUniqueId());
|
Game game = this.main.getGameManager().getGame(player.getUniqueId());
|
||||||
|
if (game == null) {
|
||||||
|
this.main.getLogger().log(Level.INFO, "GAME == NULL");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GameTeam gameTeam = game.getTeamByName(playerData.getPlayerTeam().getName());
|
GameTeam gameTeam = game.getTeams().get(playerData.getTeamId());
|
||||||
|
|
||||||
if (event.getView().getTitle().equalsIgnoreCase(CC.translate("&eUpgrades Menu"))) {
|
if (event.getView().getTitle().equalsIgnoreCase(CC.translate("&eUpgrades Menu"))) {
|
||||||
for (UpgradeItem upgradeItem : this.upgradeItems) {
|
for (UpgradeItem upgradeItem : this.upgradeItems) {
|
||||||
|
Loading…
Reference in New Issue
Block a user