Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mute dont work. #601

Open
Energobro opened this issue Jan 9, 2023 · 10 comments
Open

Mute dont work. #601

Energobro opened this issue Jan 9, 2023 · 10 comments

Comments

@Energobro
Copy link

_What version of AdvancedBan (/AdvancedBan) are you using? - last version

_What kind of server do you have (Bungeecord/single server)? single server

_What server version (/version) are you using? - 1.19.2 Purpur

Please provide the EXACT steps required to reproduce the problem...

  1. /mute nickname reason
  2. enter text in the chat

Any error/log post it through pastebin.com and link it here. (Also include /plugins/AdvancedBan/logs/latest.log) - no errors, log -
2023-01-09-1.log.gz

Add any additional information below. -
Entered the command /mute The player's nickname and the reason, but he can still talk to the chat even though he is not an OP and does not have any rights.
https://youtu.be/qX67OJyzGmE - youtube link with the problem

@Hopefuls
Copy link
Collaborator

Hopefuls commented Jan 9, 2023

Seems like you're using a chat formatting plugin that interferes with it. Could you try removing it and checking if it works without it?

@Energobro
Copy link
Author

Works without chat formatting
But I want to mute with formatting

@Hopefuls
Copy link
Collaborator

Hopefuls commented Jan 9, 2023

What plugin are you using to format the chat? If the plugin is still allowing you to chat then its related to the plugin and might be only something that can be fixed by that chat plugin owner.

@Energobro
Copy link
Author

The owner of the chat is me. Using TextComponent on AsyncPlayerChatEvent

@Energobro
Copy link
Author

How can I fix this problem for myself?

@Hopefuls
Copy link
Collaborator

Hopefuls commented Jan 9, 2023

Ensure that you're correctly re-formatting the message (using the setFormat Method or something like that, instead of just cancelling the event and sending it through a Broadcast for example), aswell as respecting the cancellation status of the event (refer to the spigot documentation regarding cancelled events).

AdvancedBan works on the highest priority as can be seen here on the bukkit-based chat listener. On this you're also able to see how AdvancedBan handles a mute status so you can adjust your plugin accordingly.

@Energobro
Copy link
Author

On that link, everything is not very clear, what should I write to check if the player is muted?

@Hopefuls
Copy link
Collaborator

Hopefuls commented Jan 9, 2023

TL;DR: You are not respecting the cancellation status of the event is my guess, you can read more about it on the EventAPI documentation on SpigotMC.org.. I cannot provide support regarding your plugin.

@Hopefuls
Copy link
Collaborator

Hopefuls commented Jan 9, 2023

I realized that I need to cancel the action. if(Universal.get().getMethods().callChat(e.getPlayer())){ ?

Not cancel, you need to check if the event has been cancelled already. I have no clue how you're actually handling events, nor is this the right channel to ask that. You can ask in our discord server in the development channel and wait for someone who can help .

@Energobro
Copy link
Author

In that discord figs who will help you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants