Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Add mutable "viewers" list to DiscordRelayEvent

Open NoahvdAa opened this issue 3 years ago • 0 comments

Information

This PR closes #5070.

Details

Proposed feature:

Expose a mutable list in the DiscordRelayEvent to change who receives the bridged message.

Environments tested:

OS: macOS

Java version: openjdk version "17.0.1" 2021-10-19

  • [x] Most recent Paper version (1.19.2 git-Paper-132)
  • [ ] CraftBukkit/Spigot/Paper 1.12.2
  • [ ] CraftBukkit 1.8.8

Demonstration:

@EventHandler
public void onDiscordRelay(DiscordRelayEvent event) {
    event.getViewers().removeIf(user -> user.getName().equals("Jroy"));
}

NoahvdAa avatar Aug 21 '22 09:08 NoahvdAa