PlotSquared icon indicating copy to clipboard operation
PlotSquared copied to clipboard

Prevent players in plot chat to see messages from ignored players

Open PapiCapi opened this issue 1 year ago • 4 comments

What feature do you want to see added?

Currently if you ignore a player with Essentials, you still see his messages in plot chat. It would be cool to prevent this behaviour as Essentials is already a softdepend.

Are there any alternatives?

Maybe create a PlotChatEvent or something like that so plugins could hook into it and handle the cancellation.

Anything else?

No response

PapiCapi avatar Apr 27 '24 17:04 PapiCapi

Note: The PlotSquared (Bukkit) API includes a onChat Event (JavaDoc).

Since the ignore feature in this case comes from Essentials (and it is not a feature that many other plugins include), I suggest that Essentials or an Add-On for Essentials should handle it with the PlotSquared API.

RedstoneFuture avatar May 23 '24 19:05 RedstoneFuture

I'm unsure on that as well - I mean, PS already interacts with Essentials so it wouldn't be that big of an overhead. But there must be some kind of line to which support can be put natively into PS and which should be done by 3rd party plugins / addons.

Some input of @IntellectualSites/plotsquared-team would be appreciated before I do anything with the issue

PierreSchwang avatar May 28 '24 18:05 PierreSchwang

I'm unsure on that as well - I mean, PS already interacts with Essentials so it wouldn't be that big of an overhead. But there must be some kind of line to which support can be put natively into PS and which should be done by 3rd party plugins / addons.

Some input of @IntellectualSites/plotsquared-team would be appreciated before I do anything with the issue

Surely, we can do that. Similar to how EssentialsX' vanish works (canSee iirc), which we support through the API too, we can respect the proper server API here as well.

NotMyFault avatar May 31 '24 19:05 NotMyFault

Hello, i've been searching how Essentials prevents ignored players from seeing messages and it seems that :

  • the ignore command (https://github.com/EssentialsX/Essentials/blob/2.x/Essentials/src/main/java/com/earth2me/essentials/commands/Commandignore.java) uses the method User#isIgnoredPlayer to test if the user is ignored.
  • in chat the same method is used (https://github.com/EssentialsX/Essentials/blob/f1a5caf98eada55901602a66cb3f92be818f3d91/Essentials/src/main/java/com/earth2me/essentials/EssentialsPlayerListener.java#L198)

So, it seems that using the server API, there is no method that could fit the needs. Do you want to use the Essentials API to solve this issue ?

PapiCapi avatar Aug 18 '24 09:08 PapiCapi