Separate names with a comma.
Comments in 'Plugin Development' started by EvolSoft, Feb 12, 2015.
Can I block events and commands of other plugins?
For example if I have a plugin that uses chat event, can I cancel or block it from another plugin? (Like setCancelled but "called" from another plugin)
My guess would to make a function in the plugin that cancels the chat event and call it from the other plugin.
No, unless that handler has @ignoreCancelled set to true.
However, if the event is a subsequent event of another, you can cancel the previous event. For example, you can cancel PlayerCommandPreprocessEvent if you don't want PlayerChatEvent to be called.
Yes (I also used it on my ChatCensor). But I needed the code to block other events (Like PlayerDeathEvent, PlayerJoinEvent, ...)
What do you want to make?
A plugin called EventBlocker to block all events of other plugins
If we knew how to, we'd have done it a long time ago...