Skip to content

Commit

Permalink
Allow leave messages to have color
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoballen1 committed May 6, 2020
1 parent 57b7234 commit b35da70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ public void onPlayerLeave(TPlayer player, UUID playerUUID) {
: registry.getOrDefault(CatalystKeys.LEAVE_MESSAGE);

broadcastService.broadcast(
textService.of(
textService.deserialize(
message
.replace("%player%", userService.getUserName((TUser) player))
));

loggerService.info(
textService.of(
textService.deserialize(
registry.getOrDefault(CatalystKeys.LEAVE_MESSAGE)
.replace("%player%", userService.getUserName((TUser) player))
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,18 @@ public void execute(CommandSource source, @NonNull String[] args) {
count.getAndIncrement();
});
TextComponent servers = TextComponent.builder()
.append(textService.of("=========================================================\n").color(TextColor.DARK_AQUA))
.append(textService.of("=====================================================\n").color(TextColor.DARK_AQUA))
.append(pluginInfo.getPrefix())
.append(textService.of("Green = Current").color(TextColor.GREEN))
.append(textService.of(", ").color(TextColor.YELLOW))
.append(textService.of("Gray = Available").color(TextColor.GRAY))
.append(textService.of(", ").color(TextColor.YELLOW))
.append(textService.of("Red = Offline\n").color(TextColor.RED))
.append(textService.of("--------------------------------------------------------\n").color(TextColor.DARK_AQUA))
.append(textService.of("-----------------------------------------------------\n").color(TextColor.DARK_AQUA))
.append(availableServers)
.append(textService.of("\n--------------------------------------------------------\n").color(TextColor.DARK_AQUA))
.append(textService.of("\n-----------------------------------------------------\n").color(TextColor.DARK_AQUA))
.append(textService.of("Click an available server to join!").color(TextColor.GOLD))
.append(textService.of("\n=========================================================").color(TextColor.DARK_AQUA))
.append(textService.of("\n=====================================================").color(TextColor.DARK_AQUA))
.build();
player.sendMessage(servers);
return;
Expand Down

0 comments on commit b35da70

Please sign in to comment.