fix: use event#message()

This commit is contained in:
darksaid98 committed 2024-07-10 05:18:54 +02:00
1 parent c24ca1ec70
commit 1ada253b07
2 files changed
+5 -5

No files matched your search

@@ -98,7 +98,7 @@ public class StandardChannel extends Channel {
),
StandardTags.defaults(),
TagResolver.resolver( // TODO Parse color codes, the player has permissions to use
"msg", Tag.inserting(e.originalMessage())
"msg", Tag.inserting(e.message())
)
)
.build()
@@ -122,7 +122,7 @@ public class StandardChannel extends Channel {
);
// If the server has marked this Channel as hooked, fire the AsyncChatHookEvent.
// If the e is cancelled, cancel the chat entirely.
// If the event is cancelled, cancel the chat entirely.
// Fires its own sendSpyMessage().
if (isHooked())
if (!sendOffHookedMessage(e, channelType, recipients)) {
@@ -18,8 +18,8 @@ public class ChatEventProcess {
Player p = e.getPlayer();
// Save the message
Component messageContent = e.originalMessage();
String messageContentString = Adventure.plainText().serialize(messageContent);
final Component originalMessage = e.originalMessage();
final String originalMessageString = Adventure.plainText().serialize(originalMessage);
// Check if the player is muted by essentials
if (isEssentialsMuted(p)) {
@@ -27,7 +27,7 @@ public class ChatEventProcess {
return;
}
final boolean userForcedGlobal = ChatSettings.isExclamationPoint() && messageContentString.startsWith("!");
final boolean userForcedGlobal = ChatSettings.isExclamationPoint() && originalMessageString.startsWith("!");
// If the player is using /g or /n to send their message
final boolean isDirectedChat = directedChat.containsKey(p);