use of io.github.nucleuspowered.nucleus.api.module.nickname.NucleusNicknameService in project Almura by AlmuraDev.
the class ServerNickManager method sendNicknameUpdate.
public void sendNicknameUpdate(final NucleusNicknameService service, final Player player) {
final ClientboundNucleusNameChangeMappingPacket packet = this.getMappingMessage(player, this.getFormattedNickname(service, player));
Sponge.getServer().getOnlinePlayers().stream().filter(onlinePlayer -> !onlinePlayer.getUniqueId().equals(player.getUniqueId())).forEach(onlinePlayer -> this.network.sendTo(onlinePlayer, packet));
this.network.sendTo(player, this.getMappingMessage(service));
}
Aggregations