Package com.djrapitops.plan.settings
Interface ListenerService
- All Known Implementing Classes:
ListenerSvc
public interface ListenerService
Service for registering listeners as Plan.
This is an utility service for implementing listeners for platforms that don't have static access to the listener registration.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classSingleton holder for listeners. -
Method Summary
Modifier and TypeMethodDescriptionstatic ListenerServiceObtain instance of ListenerService.voidregisterListenerForPlan(Object listener) Attempts to register an event listener to the platform as Plan.
-
Method Details
-
getInstance
Obtain instance of ListenerService.- Returns:
- QueryService implementation.
- Throws:
NoClassDefFoundError- If Plan is not installed and this class can not be found or if older Plan version is installed.IllegalStateException- If Plan is installed, but not enabled.
-
registerListenerForPlan
Attempts to register an event listener to the platform as Plan.This is an utility method for implementing listeners for platforms that don't have static access to the listener registration.
The listener needs to fulfill the qualities required by the platform.
- Parameters:
listener- listener object.
-