From 177eb9b1c218fe9372f6fc446f0635234e197fef Mon Sep 17 00:00:00 2001 From: Trixkz Date: Sun, 21 Nov 2021 15:08:27 -0500 Subject: [PATCH] updates --- .../bedwars/listeners/InteractListener.java | 1 + .../scoreboard/ScoreboardProvider.java | 42 +++++++++++++------ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/src/main/java/rip/tilly/bedwars/listeners/InteractListener.java b/src/main/java/rip/tilly/bedwars/listeners/InteractListener.java index 5f9471d..25e2772 100644 --- a/src/main/java/rip/tilly/bedwars/listeners/InteractListener.java +++ b/src/main/java/rip/tilly/bedwars/listeners/InteractListener.java @@ -79,6 +79,7 @@ public class InteractListener implements Listener { break; case CREATE_PARTY: this.plugin.getPartyManager().createParty(player); + break; case COSMETICS_MENU: // open cosmetics menu diff --git a/src/main/java/rip/tilly/bedwars/providers/scoreboard/ScoreboardProvider.java b/src/main/java/rip/tilly/bedwars/providers/scoreboard/ScoreboardProvider.java index 08a38d1..ccc4f0c 100644 --- a/src/main/java/rip/tilly/bedwars/providers/scoreboard/ScoreboardProvider.java +++ b/src/main/java/rip/tilly/bedwars/providers/scoreboard/ScoreboardProvider.java @@ -9,8 +9,6 @@ import rip.tilly.bedwars.utils.CC; import java.util.ArrayList; import java.util.List; -import static rip.tilly.bedwars.utils.CC.translate; - public class ScoreboardProvider implements AssembleAdapter { private BedWars main = BedWars.getInstance(); @@ -41,15 +39,15 @@ public class ScoreboardProvider implements AssembleAdapter { } private List spawnScoreboard(PlayerData playerData) { - List strings = new ArrayList<>(); + List lines = new ArrayList(); - strings.add(CC.scoreboardBar); - strings.add("&fOnline: &d" + this.main.getServer().getOnlinePlayers().size()); - strings.add("&fPlaying: &d"); - strings.add(" "); + lines.add(CC.scoreboardBar); + lines.add("&fOnline: &d" + this.main.getServer().getOnlinePlayers().size()); + lines.add("&fPlaying: &d"); + lines.add(" "); if (true) { - strings.add("&fLevel: &d" + playerData.getLevel()); + lines.add("&fLevel: &d" + playerData.getLevel()); String finishedProgress = ""; @@ -69,13 +67,31 @@ public class ScoreboardProvider implements AssembleAdapter { leftOverProgress += "⬛"; } - strings.add("&8" + finishedProgress + "&7" + leftOverProgress + " &7(" + ((int) (playerData.getXp() * 100)) + "%&7)"); - strings.add(" "); + lines.add("&8" + finishedProgress + "&7" + leftOverProgress + " &7(" + ((int) (playerData.getXp() * 100)) + "%&7)"); + lines.add(" "); } - strings.add("&dtilly.rip"); - strings.add(CC.scoreboardBar); + lines.add("&dtilly.rip"); + lines.add(CC.scoreboardBar); - return translate(strings); + return CC.translate(lines); + } + + private List playingScoreboard(PlayerData playerData) { + List lines = new ArrayList(); + + lines.add(CC.scoreboardBar); + lines.add(CC.scoreboardBar); + + return CC.translate(lines); + } + + private List spectatingScoreboard(PlayerData playerData) { + List lines = new ArrayList(); + + lines.add(CC.scoreboardBar); + lines.add(CC.scoreboardBar); + + return CC.translate(lines); } }