Uh oh!
There was an error while loading. Please reload this page.
Add separate events for local and global chat - #4683
Conversation
Uh oh!
There was an error while loading. Please reload this page.
842e9fb to
45a0678Compare45a0678 to
bc14df3CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
18f24f7 to
f9e6f52CompareHello and thanks for the review! Sorry it took some time, but all noted issues should be fixed now. |
f9e6f52 to
1bf775eCompare1bf775e to
a0fc04cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
21b8556 to
0cd4898Comparebrawaru
commented
Jul 6, 2022
Rebased and moved new event classes to |
Hey, apologies for the slow response on this. We recently refactored EssentialsX Chat, so this PR will need need to be updated this PR accordingly (ie moving the |
0cd4898 to
c162217Comparebrawaru
commented
Aug 17, 2022
Heyo! I have rebased this on |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
8977e3f to
3c60995Compare
JRoy
left a comment
There was a problem hiding this comment.
final few things, otherwise approved for 2.20!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This commit adds two new events: GlobalChatEvent and LocalChatEvent, which allow other plugin developers to know whether the message sent is a global or local one and act accordingly. If either of those events is cancelled, then the source event is cancelled too. Since all chat-related events share the same structure, a new abstract class ChatEvent is created with change made for LocalChatSpyEvent to use it without breaking its API.
3c60995 to
7bd890dCompareThis commit adds two new events: GlobalChatEvent and LocalChatEvent, which allow other plugin developers to know whether the message sent is a global or local one and act accordingly. If either of those events is cancelled, then the source event is cancelled too. Since all chat-related events share the same structure, a new abstract class ChatEvent is created with change made for LocalChatSpyEvent to use it without breaking its API. Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com> Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Information
This PR helps DiscordSRV/DiscordSRV#1223.
Details
Proposed feature:
This PR adds two new events: GlobalChatEvent and LocalChatEvent, which allow other plugin developers to know whether the message sent is a global or local one and act accordingly. If either of those events is cancelled, then the source event is cancelled too.
Since all chat-related events share the same structure, a new abstract class ChatEvent is created with the change made for LocalChatSpyEvent to use it without breaking its API.
Environments tested:
OS: Windows 10 20H2.
Java version:
Demonstration:
Following this pull request, a draft pull request with the use of that API in Essentials Discord module was created — #4684.