Also remove the individual listeners
This commit is contained in:
parent
c472e85a27
commit
e75ff89429
@ -71,21 +71,6 @@ public abstract class ChunkListener implements Listener {
|
|||||||
Plugin plugin = Fawe.<FaweBukkit>imp().getPlugin();
|
Plugin plugin = Fawe.<FaweBukkit>imp().getPlugin();
|
||||||
plm.registerEvents(this, plugin);
|
plm.registerEvents(this, plugin);
|
||||||
try { plm.registerEvents(new ChunkListener_8Plus(this), plugin); } catch (Throwable ignore) {}
|
try { plm.registerEvents(new ChunkListener_8Plus(this), plugin); } catch (Throwable ignore) {}
|
||||||
for (Method method : this.getClass().getMethods()) {
|
|
||||||
if (method.isAnnotationPresent(EventHandler.class)) {
|
|
||||||
try {
|
|
||||||
EventHandler annotation = method.getAnnotation(EventHandler.class);
|
|
||||||
EventPriority priority = annotation.priority();
|
|
||||||
boolean ignoreC = annotation.ignoreCancelled();
|
|
||||||
Class<? extends Event> event = (Class<? extends Event>) method.getParameterTypes()[0];
|
|
||||||
EventExecutor executor = EventExecutor.create(method, event);
|
|
||||||
plm.registerEvent(event, this, priority, executor, plugin, ignoreC);
|
|
||||||
} catch (Throwable e) {
|
|
||||||
Fawe.debug("Failed to register " + method + " | " + e.getMessage());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
TaskManager.IMP.repeat(new Runnable() {
|
TaskManager.IMP.repeat(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Loading…
Reference in New Issue
Block a user