-
Notifications
You must be signed in to change notification settings - Fork 21
Listener Priorities
To prevent conflicts with other chat plugins, Bukkit came up with a priority system for plugins listening on the same event.
Plugins listening to chat at lowest priority come first. They can change the recipients, the message, or even cancel the chat sending.
Then, a plugin with higher priority can change it back, or even un-cancel it. There are six priorities in Bukkit that are called in the following order:
- LOWEST
- LOW
- NORMAL
- HIGH
- HIGHEST
- MONITOR
If we have three plugins enabled; one is a basic area protection plugin, one is a fancy plugin using signs, and another is a logging plugin. The protection plugin listens on Priority.LOWEST. It says they can't place blocks in this area, and cancels the event.
The fancy sign plugin listens on Priority.NORMAL. It says they can place signs here, and uncancels the event. The log plugin listens on Priority.MONITOR. It sees that the event was actually allowed, and logs it.
Remember, as a general rule of thumb, ChatControl need to come FIRST (meaning lowest priority and old chat event) to edit and cancel the message. If the other plugin comes before us (such as DiscordSRV) it will still send your message to your Discord even if ChatControl cancels it. To fix this, you need to play with this option, as well as play with different priorities. Congratulations to Paper team for wasting your time :/
NB: You must restart the server after changing the priority to take changes!
For the most servers, you will need to experiment with the values to find a suitable combination that works for you. One user has reported following configuration working well with FactionsChat
:
Chat_Listener_Priority: LOWEST
If players can speak even when muted, it means that ChatControl listens to the chat event before the plugin that mutes your players, and thus allow them to speak anyway.
Users have reported that changing the Formatter priority to HIGH have fixed the issue.
You may experiment with different values (LOWEST, LOW, NORMAL, HIGH, HIGHEST and also MONITOR) to find a combination that works with your other plugins.
Use the following settings to allow the Citizens2-Addon Denizen to catch chat-triggers for its scripts.
Chat_Listener_Priority: HIGH
© MineAcademy | Code Unique Minecraft Plugins & Servers In 20 Days
Installation
Troubleshooting
Basics
Learn
- Channels
- Formats
- Rules
- Rules Creator
- Messages
- Variables
- JavaScript Variables
- Running JavaScript Code
- Logs
- Spying
- Books
Tweaking
- Performance
- Chat Bots
- Groups
- Sound Notify
- Newcomer
- Super Cool Messages
- Custom Commands
- Listener Priorities
- JSON
- API
Tutorials
About