From 2169712940956f3cd9ada7e84608a4a3592b293a Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Tue, 24 May 2022 09:03:44 -0400 Subject: [PATCH] 1.5.0 Release Candidate 4 --- src/main/java/net/tylermurphy/hideAndSeek/game/Board.java | 3 +-- .../net/tylermurphy/hideAndSeek/game/PlayerLoader.java | 1 + .../net/tylermurphy/hideAndSeek/util/PAPIExpansion.java | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/Board.java b/src/main/java/net/tylermurphy/hideAndSeek/game/Board.java index bb1984e..c6aaaf5 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/Board.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/Board.java @@ -239,7 +239,6 @@ public class Board { board.updateTeams(); } - int timeLeft = Main.getInstance().getGame().getTimeLeft(); Status status = Main.getInstance().getGame().getStatus(); @@ -279,7 +278,7 @@ public class Board { board.setLine(String.valueOf(i), line.replace("{TAUNT}", TAUNT_ACTIVE)); } } else if (line.contains("{GLOW}")) { - if (!glowEnabled) return; + if (!glowEnabled) continue; if (glow == null || status == Status.STARTING || !glow.isRunning()) { board.setLine(String.valueOf(i), line.replace("{GLOW}", GLOW_INACTIVE)); } else { diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/PlayerLoader.java b/src/main/java/net/tylermurphy/hideAndSeek/game/PlayerLoader.java index 19a48f4..211a425 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/PlayerLoader.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/PlayerLoader.java @@ -70,6 +70,7 @@ public class PlayerLoader { } public static void resetPlayer(Player player, Board board){ + if(board.isSeeker(player)) return; loadPlayer(player); if (board.isSeeker(player)) { if (pvpEnabled) diff --git a/src/main/java/net/tylermurphy/hideAndSeek/util/PAPIExpansion.java b/src/main/java/net/tylermurphy/hideAndSeek/util/PAPIExpansion.java index f1a1ce1..678b46f 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/util/PAPIExpansion.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/util/PAPIExpansion.java @@ -40,9 +40,9 @@ public class PAPIExpansion extends PlaceholderExpansion { String[] args = params.split("_"); if (args.length < 1) return null; if (args[0].equals("stats") && (args.length == 2 || args.length == 3)) { - PlayerInfo info = null; + PlayerInfo info; if(args.length == 2) { - database.getGameData().getInfo(player.getUniqueId()); + info = database.getGameData().getInfo(player.getUniqueId()); } else { UUID uuid; try { uuid = Main.getInstance().getDatabase().getNameData().getUUID(args[2]); } catch (Exception e) { return placeholderError; } @@ -64,9 +64,9 @@ public class PAPIExpansion extends PlaceholderExpansion { } } else if (args[0].equals("rank-place") && (args.length == 2 || args.length == 3)) { if (getRanking(args[1]) == null) { return placeholderError; } - PlayerInfo info = null; + PlayerInfo info; if(args.length == 2){ - database.getGameData().getInfo(player.getUniqueId()); + info = database.getGameData().getInfo(player.getUniqueId()); } else { UUID uuid; try { uuid = Main.getInstance().getDatabase().getNameData().getUUID(args[2]); } catch (Exception e) { return placeholderError; }