From bff4790a1834c2d610acc493fae07ee6c31fa7a7 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 20 Feb 2011 00:47:21 +0000 Subject: [PATCH] And this is so that we don't have to support misbehaving plugins. By: Dinnerbone --- .../src/main/java/org/bukkit/plugin/SimplePluginManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java index 1b6127883a..5b35e81e7b 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -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)); }