Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -794,10 +794,9 @@ public void handlePlayerCommandPreprocess(final PlayerCommandPreprocessEvent eve
final ComponentHolder base = (user.isMuted() && ess.getSettings().getSocialSpyListenMutedPlayers())
? spyer.tlComponent("socialSpyMutedPrefix")
: spyer.tlComponent("socialSpyPrefix");
final ComponentHolder nameComponent = ess.getAdventureFacet().legacyToAdventure(playerName);
final ComponentHolder messageComponent = ess.getAdventureFacet().text(": " + event.getMessage());
final ComponentHolder formatted = ess.getAdventureFacet().deserializeMiniMessage(spyer.playerTl("socialSpyCmdFormat", playerName, event.getMessage()));

spyer.sendComponent(ess.getAdventureFacet().append(base, nameComponent, messageComponent));
spyer.sendComponent(ess.getAdventureFacet().append(base, formatted));
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Essentials/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,7 @@ slimeMalformedSize=<dark_red>Malformed size.
smithingtableCommandDescription=Opens up a smithing table.
smithingtableCommandUsage=/<command>
socialSpy=<primary>SocialSpy for <secondary>{0}<primary>\: <secondary>{1}
socialSpyCmdFormat=<gray>{0}\: {1}
socialSpyMsgFormat=<primary>[<secondary>{0}<gray> -> <secondary>{1}<primary>] <gray>{2}
socialSpyMutedPrefix=<white>[<primary>SS<white>] <gray>(muted) <reset>
socialspyCommandDescription=Toggles if you can see msg/mail commands in chat.
Expand Down
1 change: 1 addition & 0 deletions Essentials/src/main/resources/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,7 @@ slimeMalformedSize=<dark_red>Malformed size.
smithingtableCommandDescription=Opens up a smithing table.
smithingtableCommandUsage=/<command>
socialSpy=<primary>SocialSpy for <secondary>{0}<primary>\: <secondary>{1}
socialSpyCmdFormat=<gray>{0}\: {1}
socialSpyMsgFormat=<primary>[<secondary>{0}<gray> -> <secondary>{1}<primary>] <gray>{2}
socialSpyMutedPrefix=<white>[<primary>SS<white>] <gray>(muted) <reset>
socialspyCommandDescription=Toggles if you can see msg/mail commands in chat.
Expand Down
Loading