diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/plugin/SimplePluginManager.java | 7 | ||||
-rw-r--r-- | src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java index 3dff6d23..e454c864 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -537,12 +537,7 @@ public final class SimplePluginManager implements PluginManager { } for (Map.Entry<Class<? extends Event>, Set<RegisteredListener>> entry : plugin.getPluginLoader().createRegisteredListeners(listener, plugin).entrySet()) { - Class<? extends Event> delegatedClass = getRegistrationClass(entry.getKey()); - if (!entry.getKey().equals(delegatedClass)) { - plugin.getServer().getLogger().severe("Plugin attempted to register delegated event class " + entry.getKey() + ". It should be using " + delegatedClass + "!"); - continue; - } - getEventListeners(delegatedClass).registerAll(entry.getValue()); + getEventListeners(getRegistrationClass(entry.getKey())).registerAll(entry.getValue()); } } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index 790dd5e9..20e0a547 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -1019,7 +1019,7 @@ public class JavaPluginLoader implements PluginLoader { public void execute(Listener listener, Event event) throws EventException { try { if (!eventClass.isAssignableFrom(event.getClass())) { - throw new EventException("Wrong event type passed to registered method"); + return; } method.invoke(listener, event); } catch (Throwable t) { |