Do not render flairs in staff list
This commit is contained in:
parent
1db09aebd8
commit
2d73675c07
|
@ -18,6 +18,7 @@ import tc.oc.api.friendships.FriendshipRequest;
|
|||
import tc.oc.api.friendships.FriendshipService;
|
||||
import tc.oc.api.minecraft.MinecraftService;
|
||||
import tc.oc.commons.bukkit.chat.Links;
|
||||
import tc.oc.commons.bukkit.chat.NameStyle;
|
||||
import tc.oc.commons.bukkit.chat.PlayerComponent;
|
||||
import tc.oc.commons.core.util.Lazy;
|
||||
import tc.oc.minecraft.scheduler.SyncExecutor;
|
||||
|
@ -216,7 +217,7 @@ public class UserCommands implements Commands {
|
|||
.extra(new Component(String.valueOf(result.documents().size()), ChatColor.AQUA))
|
||||
.extra(")")
|
||||
));
|
||||
userFormatter.formatSessions(result.documents()).forEach(audience::sendMessage);
|
||||
userFormatter.formatSessions(result.documents(), NameStyle.COLOR).forEach(audience::sendMessage);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
@ -88,10 +88,14 @@ public class UserFormatter {
|
|||
}
|
||||
|
||||
public List<BaseComponent> formatSessions(Collection<Session> sessions) {
|
||||
return formatSessions(sessions, minecraftService.getLocalServer());
|
||||
return formatSessions(sessions, NameStyle.FANCY);
|
||||
}
|
||||
|
||||
public List<BaseComponent> formatSessions(Collection<Session> sessions, ServerDoc.Identity localServer) {
|
||||
public List<BaseComponent> formatSessions(Collection<Session> sessions, NameStyle style) {
|
||||
return formatSessions(sessions, minecraftService.getLocalServer(), style);
|
||||
}
|
||||
|
||||
public List<BaseComponent> formatSessions(Collection<Session> sessions, ServerDoc.Identity localServer, NameStyle style) {
|
||||
List<BaseComponent> lines = new ArrayList<>();
|
||||
|
||||
SetMultimap<Server, BaseComponent> namesByServer = HashMultimap.create();
|
||||
|
@ -100,7 +104,7 @@ public class UserFormatter {
|
|||
if(session.end() == null) {
|
||||
final Server server = serverStore.byId(session.server_id());
|
||||
if(server != null) {
|
||||
namesByServer.put(server, new PlayerComponent(identityProvider.createIdentity(session), NameStyle.FANCY));
|
||||
namesByServer.put(server, new PlayerComponent(identityProvider.createIdentity(session), style));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue