Fix Team Chat 1.0

Re-adds the vanilla formatting for scoreboard teams.

  1. FireControl1847
    Native Minecraft Version:
    1.14
    Tested Minecraft Versions:
    • 1.14
    • 1.15
    • 1.16
    A long-lasting issue with Bukkit is that the chat is reset after vanilla to add compatibility for plugins. This sounds fine, but the issue comes into play when you want to use the Vanilla Scoreboard Teams (now just known as Teams). Bukkit completely removes prefixes, colors, and suffixes for these teams. That's stupid!

    So, to fix this issue, I've made this plugin. This plugin re-adds the vanilla formatting for scoreboard teams.

    Due to how this plugin works, this will not work with any other chat formatting plugin. It resets your displayName and adds it just like how vanilla should be.

    It's extremely lightweight (it's 10 lines of code), so it shouldn't bog down the server performance whatsoever. In fact, it's so lightweight, I'll post the source code right here!

    Code (Java):
    @EventHandler
    public void onPlayerChat(AsyncPlayerChatEvent event) {
        if (event.getPlayer() != null) {
            Player player = event.getPlayer();
            player.setDisplayName(player.getName());
            Team team = player.getScoreboard().getEntryTeam(player.getName());
            if (team != null) {
                String format = "<" + team.getPrefix();
                format += team.getColor() + "%s";
                format += ChatColor.RESET + team.getSuffix();
                format += ChatColor.RESET + "> %s";
                event.setFormat(format);
            }
        }
    }

Recent Reviews

  1. spectrasonic
    spectrasonic
    5/5,
    Version: 1.0
    Works Perfectly in 1.17 just install and nothing more, fix the bug on the spigot/paper servers
  2. Matiester
    Matiester
    5/5,
    Version: 1.0
    While searching for this issue on internet i found this plugin. Works excellent, thanx
  3. LuccaTopssi
    LuccaTopssi
    4/5,
    Version: 1.0
    It works, but when I put some text to appear when hovering over the team icon nothing appears, I would like you to solve it please.
  4. Lord_Eredin
    Lord_Eredin
    5/5,
    Version: 1.0
    light, wonderfull, excelent, I just need that.
    Resolve Spigot/Bukkit chat intencioned bug
  5. TeknosGamer58
    TeknosGamer58
    5/5,
    Version: 1.0
    This is a neat little plugin! It works on Spigot 1.16.1.
    Tysm for making this plugin.
  6. Melikesong
    Melikesong
    5/5,
    Version: 1.0
    Does what is says on the tin, works great!

    Personally I'd love to see this backported to other versions, but even if it's 1.14 only it's still a godsend.
  7. PablikoX
    PablikoX
    5/5,
    Version: 1.0
    Thank you so much, works perfectly. Drag it to the plugins folder and you're done ^^