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!
Source Code
@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);
}
}
}Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
26.2MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.9MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
4.7MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta