how to register a listener in spigot code example Example: register listener spigot getServer().getPluginManager().registerEvents(new Listener(), this);