Search in sources :

Example 6 with Listener

use of org.bukkit.event.Listener in project AuthMeReloaded by AuthMe.

the class ListenerConsistencyTest method collectListenerClasses.

@BeforeClass
public static void collectListenerClasses() {
    ClassCollector collector = new ClassCollector(TestHelper.SOURCES_FOLDER, TestHelper.PROJECT_ROOT + "listener");
    classes = collector.collectClasses(Listener.class);
    if (classes.isEmpty()) {
        throw new IllegalStateException("Did not find any Listener classes. Is the folder correct?");
    }
}
Also used : Listener(org.bukkit.event.Listener) ClassCollector(fr.xephi.authme.ClassCollector) BeforeClass(org.junit.BeforeClass)

Aggregations

Listener (org.bukkit.event.Listener)6 Event (org.bukkit.event.Event)4 EventException (org.bukkit.event.EventException)3 EventExecutor (org.bukkit.plugin.EventExecutor)3 PluginManager (org.bukkit.plugin.PluginManager)3 Method (java.lang.reflect.Method)2 EventHandler (org.bukkit.event.EventHandler)2 PlayerJoinEvent (org.bukkit.event.player.PlayerJoinEvent)2 SignBlockListener (com.earth2me.essentials.signs.SignBlockListener)1 SignEntityListener (com.earth2me.essentials.signs.SignEntityListener)1 SignPlayerListener (com.earth2me.essentials.signs.SignPlayerListener)1 ClassCollector (fr.xephi.authme.ClassCollector)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 Set (java.util.Set)1 Warning (org.bukkit.Warning)1 WarningState (org.bukkit.Warning.WarningState)1 Player (org.bukkit.entity.Player)1