mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 22:21:52 +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(),
|
StandardTags.defaults(),
|
||||||
TagResolver.resolver( // TODO Parse color codes, the player has permissions to use
|
TagResolver.resolver( // TODO Parse color codes, the player has permissions to use
|
||||||
"msg", Tag.inserting(e.originalMessage())
|
"msg", Tag.inserting(e.message())
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.build()
|
.build()
|
||||||
@@ -122,7 +122,7 @@ public class StandardChannel extends Channel {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// If the server has marked this Channel as hooked, fire the AsyncChatHookEvent.
|
// 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().
|
// Fires its own sendSpyMessage().
|
||||||
if (isHooked())
|
if (isHooked())
|
||||||
if (!sendOffHookedMessage(e, channelType, recipients)) {
|
if (!sendOffHookedMessage(e, channelType, recipients)) {
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ public class ChatEventProcess {
|
|||||||
Player p = e.getPlayer();
|
Player p = e.getPlayer();
|
||||||
|
|
||||||
// Save the message
|
// Save the message
|
||||||
Component messageContent = e.originalMessage();
|
final Component originalMessage = e.originalMessage();
|
||||||
String messageContentString = Adventure.plainText().serialize(messageContent);
|
final String originalMessageString = Adventure.plainText().serialize(originalMessage);
|
||||||
|
|
||||||
// Check if the player is muted by essentials
|
// Check if the player is muted by essentials
|
||||||
if (isEssentialsMuted(p)) {
|
if (isEssentialsMuted(p)) {
|
||||||
@@ -27,7 +27,7 @@ public class ChatEventProcess {
|
|||||||
return;
|
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
|
// If the player is using /g or /n to send their message
|
||||||
final boolean isDirectedChat = directedChat.containsKey(p);
|
final boolean isDirectedChat = directedChat.containsKey(p);
|
||||||
|
|||||||
Reference in new issue
Block a user