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