mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-04-06 13:30:43 +08:00
Fire GlobalChatEvent even when local chat is disabled (#6113)
This allows EssentialsX Discord to send EssentialsX Chat messages to Discord when `use-essentials-events: true` is set in the Discord config while local chat is disabled. It also allows plugins to hook and modify EssentialsX Chat message contents, formatting and recipients when local chat is disabled.
This commit is contained in:
parent
f09541cfa6
commit
c7ff994d18
@ -141,8 +141,9 @@ public abstract class AbstractChatHandler {
|
||||
|
||||
final ChatProcessingCache.Chat chat = cache.getProcessedChat(event.getPlayer());
|
||||
|
||||
// If local chat is enabled, handle the recipients here; else we have nothing to do
|
||||
// If local chat is enabled, handle the recipients here; else we can just fire the chat event and return
|
||||
if (chat.getRadius() < 1) {
|
||||
callChatEvent(event, chat.getType(), null);
|
||||
return;
|
||||
}
|
||||
final long radiusSquared = chat.getRadius() * chat.getRadius();
|
||||
|
Loading…
x
Reference in New Issue
Block a user