mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
And this is so that we don't have to support misbehaving plugins.
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
03a61a197f
commit
bff4790a18
@ -239,6 +239,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
* @param plugin Plugin to register
|
||||
*/
|
||||
public void registerEvent(Event.Type type, Listener listener, Priority priority, Plugin plugin) {
|
||||
if (!plugin.isEnabled()) {
|
||||
System.out.println("Warning! Plugin '" + plugin.getDescription().getName() + "' (ver " + plugin.getDescription().getVersion() + ") is registering events before it is enabled. It may be misbehaving and the author needs to fix this.");
|
||||
}
|
||||
getEventListeners( type ).add(new RegisteredListener(listener, priority, plugin, type));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user