Show no player hover for players of the public team

This commit is contained in:
2026-10-18 20:01:24 +02:00
parent 12dd46176b
commit 253a975c73
@@ -113,10 +113,11 @@ public class ChatFormat {
* Shows the team of the user when hovering the component, the SteamWar team for server team members using the SW prefix.
*/
public static Component withTeamHover(Chatter receiver, SteamwarUser user, Component component) {
// Players of the public team (id 0) get no hover
if (user.getTeam() == 0) return component;
if (useSwPrefix(user)) {
return component.hoverEvent(HoverEvent.showText(receiver.parse(new Message("CHAT_HOVER_TEAM", "SteamWar", "§e", "S§8W"))));
}
if (user.getTeam() == 0) return component;
return component.hoverEvent(HoverEvent.showText(teamHover(receiver, Team.byId(user.getTeam()))));
}