The point of listener interface

Discussion in 'Plugin Help/Development/Requests' started by TheDiamond06, Jun 7, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    TheDiamond06

    I was viewing the code of Bukkit 1.8 API to see what kinds of things they have. I came across the Listener interface, which I know you must implement for events to be registered, I also know they must be registered on the onEnable. However, with my knowledge of interfaces there should be something inside of that interface. However there is absolutely nothing. I viewed other classes such as the EventPriority and EventHandler interface and saw they have nothing to do with the Listener interface.

    So what is the point of the Listener interface, and what is the point of implementing it if it has absolutely nothing inside of it.
     
  2. Offline

    I Al Istannen

  3. Offline

    Goblom

    The point of the "Listener" interface is so that bukkit knows that there are EventHandlers inside that class that need to be registered.

    Also, just to point out. Listeners do not need to be registered in onEnable they can be registered anywhere at any time.
     
  4. Moved to Bukkit Alternates.
     
  5. Offline

    TheDiamond06

    @Goblom There is another @interface for EventHandlers, shouldn't that be implemented?
     
Thread Status:
Not open for further replies.

Share This Page