mirror of
https://github.com/kaboomserver/extras.git
synced 2025-02-11 03:29:50 +00:00
Append to an empty component instead of the prefix (#334)
This commit is contained in:
parent
b3555d92d8
commit
91481b94e4
1 changed files with 4 additions and 3 deletions
|
@ -92,10 +92,11 @@ public class PlayerPrefix implements Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void onUpdate(Player player) throws IOException {
|
private static void onUpdate(Player player) throws IOException {
|
||||||
final Component prefix = getPrefix(player);
|
final Component component = Component.empty()
|
||||||
final Component displayName = player.displayName();
|
.append(getPrefix(player))
|
||||||
|
.append(player.displayName());
|
||||||
|
|
||||||
player.playerListName(prefix.append(displayName));
|
player.playerListName(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
|
|
Loading…
Reference in a new issue