diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/UserCommands.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/UserCommands.java index 5a41263..e3db63c 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/UserCommands.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/commands/UserCommands.java @@ -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); }) ); } diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/format/UserFormatter.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/format/UserFormatter.java index d448cfe..01edb6e 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/format/UserFormatter.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/format/UserFormatter.java @@ -88,10 +88,14 @@ public class UserFormatter { } public List formatSessions(Collection sessions) { - return formatSessions(sessions, minecraftService.getLocalServer()); + return formatSessions(sessions, NameStyle.FANCY); } - public List formatSessions(Collection sessions, ServerDoc.Identity localServer) { + public List formatSessions(Collection sessions, NameStyle style) { + return formatSessions(sessions, minecraftService.getLocalServer(), style); + } + + public List formatSessions(Collection sessions, ServerDoc.Identity localServer, NameStyle style) { List lines = new ArrayList<>(); SetMultimap 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)); } } }