forked from SteamWar/SteamWar
Show no player hover for players of the public team
This commit is contained in:
@@ -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()))));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user