From d7136150fd30fe3d392457ee09056af5c41f2c91 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Tue, 14 May 2019 04:18:18 -0400 Subject: [PATCH] Get rid of the Guava Subscribe annotation check I think we can trust that if you're working with Velocity, you can find the right Velocity subscribe annotation. --- .../proxy/plugin/VelocityEventManager.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityEventManager.java b/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityEventManager.java index 7badf9ccb..51e625733 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityEventManager.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityEventManager.java @@ -15,7 +15,6 @@ import java.net.URL; import java.util.ArrayList; import java.util.Collection; import java.util.IdentityHashMap; -import java.util.Objects; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -30,7 +29,6 @@ import net.kyori.event.method.asm.ASMEventExecutorFactory; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.checkerframework.checker.nullness.qual.NonNull; -import org.checkerframework.checker.nullness.qual.Nullable; public class VelocityEventManager implements EventManager { @@ -87,14 +85,6 @@ public class VelocityEventManager implements EventManager { throw new IllegalArgumentException("The plugin main instance is automatically registered."); } - for (Method method : listener.getClass().getDeclaredMethods()) { - if (method.isAnnotationPresent(com.google.common.eventbus.Subscribe.class)) { - throw new IllegalArgumentException("Method " + listener.getClass().getName() + "#" - + method.getName() + " has a Guava @Subscribe annotation. Use the Velocity @Subscribe " - + "annotation instead."); - } - } - registeredListenersByPlugin.put(plugin, listener); methodAdapter.register(listener); }