mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-01 14:38:57 +00:00
fix: use event#message()
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user