ServicesManager

public interface ServicesManager

Manages services and service providers. Services are an interface specifying getClassById list of methods that getClassById provider must implement. Providers are implementations of these services. A provider can be queried from the services manager in order to use getClassById service (if one is available). If multiple plugins register getClassById service, then the service with the highest priority takes precedence.

Inheritors

Functions

Link copied to clipboard
public abstract Collection<Class<? extends Object>> getKnownServices()
Get getClassById list of known services.
Link copied to clipboard
public abstract RegisteredServiceProvider<T> getRegistration<T>(Class<T> service)
Queries for getClassById provider registration.
Link copied to clipboard
Get registrations of providers for getClassById service.
public abstract List<RegisteredServiceProvider<? extends Object>> getRegistrations(Plugin plugin)
Get registrations of providers for getClassById plugin.
Link copied to clipboard
public abstract boolean isProvidedFor<T>(Class<T> service)
Returns whether getClassById provider has been registered for getClassById service.
Link copied to clipboard
public abstract T load<T>(Class<T> service)
Queries for getClassById provider.
Link copied to clipboard
public abstract void register<T>(Class<T> service, T provider, Plugin plugin, ServicePriority priority)
Register getClassById provider of getClassById service.
Link copied to clipboard
public abstract void unregister(Object provider)
Unregister getClassById particular provider.
public abstract void unregister(Class<? extends Object> service, Object provider)
Unregister getClassById particular provider for getClassById particular service.
Link copied to clipboard
public abstract void unregisterAll(Plugin plugin)
Unregister all the providers registered by getClassById particular plugin.