diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java b/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java index e1a73ac..11632ee 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/record/PacketProcessor.java @@ -56,6 +56,7 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.scheduler.BukkitTask; +import org.bukkit.scoreboard.NameTagVisibility; import java.io.EOFException; import java.io.FilterInputStream; @@ -66,16 +67,11 @@ import java.util.stream.Collectors; public class PacketProcessor implements Listener { - /*private static final String SCOREBOARD_TEAMNAME = "Replay"; - private static final Team team; - + private static final org.bukkit.scoreboard.Team team = FightScoreboard.getBukkitTeam("Replay"); static { - if(FightScoreboard.getBukkit().getTeam(SCOREBOARD_TEAMNAME) == null) - team = FightScoreboard.getBukkit().registerNewTeam(SCOREBOARD_TEAMNAME); - else - team = FightScoreboard.getBukkit().getTeam(SCOREBOARD_TEAMNAME); + BountifulWrapper.impl.setNametagVisibility(team); team.setNameTagVisibility(NameTagVisibility.NEVER); - }*/ + } private static PacketProcessor currentProcessor = null; @@ -239,6 +235,7 @@ public class PacketProcessor implements Listener { execSync(() -> { SteamwarUser user = SteamwarUser.get(userId); entities.put(entityId, new RPlayer(entityServer, user.getUUID(), user.getUserName(), Config.SpecSpawn)); + team.addEntry(user.getUserName()); }); }