#Do I have to save the instance of a Listener if I want to unregister it later?

1 messages · Page 1 of 1 (latest)

hollow jungle
#

title says it all

languid pebble
#

Depends

#

Checkout HandlerList and EventClass.getHandlerList()

hollow jungle
#

What do you mean by EventClass.getHandlerList()?

languid pebble
#

For instance

#

PlayerJoinEvent.getHandlerList() to get the HandlerList instance for PlayerJoinEvent (since that instance is responsible for all listeners that listen to PlayerJoinEvent)