From b824bbc05f3d911a7f13ba8adf6cbf36c45d819c Mon Sep 17 00:00:00 2001 From: ellieisjelly Date: Mon, 12 Feb 2024 10:43:32 -0300 Subject: [PATCH] Hide numbers on sidebar --- .../me/ellieis/Sabotage/game/phase/SabotageActive.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/me/ellieis/Sabotage/game/phase/SabotageActive.java b/src/main/java/me/ellieis/Sabotage/game/phase/SabotageActive.java index c6eb29c..8fb9687 100644 --- a/src/main/java/me/ellieis/Sabotage/game/phase/SabotageActive.java +++ b/src/main/java/me/ellieis/Sabotage/game/phase/SabotageActive.java @@ -30,6 +30,7 @@ import net.minecraft.network.packet.s2c.play.TeamS2CPacket; import net.minecraft.scoreboard.Scoreboard; import net.minecraft.scoreboard.Team; +import net.minecraft.scoreboard.number.BlankNumberFormat; import net.minecraft.screen.ScreenTexts; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; @@ -210,6 +211,12 @@ public void setSidebars() { detectiveSidebar.removePlayer(plr); innocentSidebar.removePlayer(plr); }); + + globalSidebar.setDefaultNumberFormat(BlankNumberFormat.INSTANCE); + innocentSidebar.setDefaultNumberFormat(BlankNumberFormat.INSTANCE); + detectiveSidebar.setDefaultNumberFormat(BlankNumberFormat.INSTANCE); + saboteurSidebar.setDefaultNumberFormat(BlankNumberFormat.INSTANCE); + saboteurs.forEach(plr -> saboteurSidebar.addPlayer(plr)); detectives.forEach(plr -> detectiveSidebar.addPlayer(plr)); innocents.forEach(plr -> innocentSidebar.addPlayer(plr));