程序包 org.bukkit.plugin

# 类 SimpleServicesManager

java.lang.Object
org.bukkit.plugin.SimpleServicesManager

所有已实现的接口:
  `ServicesManager`

public class SimpleServicesManager extends Object implements ServicesManager
A simple services manager.

- ## 构造器概要

  构造器
  构造器
  说明
  `SimpleServicesManager()`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull Set<Class<?>>`
  `getKnownServices()`
  Get a list of known services.
  `<T> @Nullable RegisteredServiceProvider<T>`
  `getRegistration(@NotNull Class<T> service)`
  Queries for a provider registration.
  `<T> @NotNull List<RegisteredServiceProvider<T>>`
  `getRegistrations(@NotNull Class<T> service)`
  Get registrations of providers for a service.
  `@NotNull List<RegisteredServiceProvider<?>>`
  `getRegistrations(@NotNull Plugin plugin)`
  Get registrations of providers for a plugin.
  `<T> boolean`
  `isProvidedFor(@NotNull Class<T> service)`
  Returns whether a provider has been registered for a service.
  `<T> T`
  `load(@NotNull Class<T> service)`
  Queries for a provider.
  `<T> void`
  `register(@NotNull Class<T> service, T provider, @NotNull Plugin plugin, @NotNull ServicePriority priority)`
  Register a provider of a service.
  `void`
  `unregister(@NotNull Class<?> service, @NotNull Object provider)`
  Unregister a particular provider for a particular service.
  `void`
  `unregister(@NotNull Object provider)`
  Unregister a particular provider.
  `void`
  `unregisterAll(@NotNull Plugin plugin)`
  Unregister all the providers registered by a particular plugin.

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### SimpleServicesManager

    public SimpleServicesManager()

- ## 方法详细资料

  - ### register

    public <T> void register(@NotNull @NotNull Class<T> service, @NotNull T provider, @NotNull @NotNull Plugin plugin, @NotNull @NotNull ServicePriority priority)
    Register a provider of a service.
    指定者:
      `register` 在接口中 `ServicesManager`
    类型参数:
      `T` - Provider
    参数:
      `service` - service class
      `provider` - provider to register
      `plugin` - plugin with the provider
      `priority` - priority of the provider

  - ### unregisterAll

    public void unregisterAll(@NotNull @NotNull Plugin plugin)
    Unregister all the providers registered by a particular plugin.
    指定者:
      `unregisterAll` 在接口中 `ServicesManager`
    参数:
      `plugin` - The plugin

  - ### unregister

    public void unregister(@NotNull @NotNull Class<?> service, @NotNull @NotNull Object provider)
    Unregister a particular provider for a particular service.
    指定者:
      `unregister` 在接口中 `ServicesManager`
    参数:
      `service` - The service interface
      `provider` - The service provider implementation

  - ### unregister

    public void unregister(@NotNull @NotNull Object provider)
    Unregister a particular provider.
    指定者:
      `unregister` 在接口中 `ServicesManager`
    参数:
      `provider` - The service provider implementation

  - ### load

    @Nullable public <T> T load(@NotNull @NotNull Class<T> service)
    Queries for a provider. This may return if no provider has been registered for a service. The highest priority provider is returned.
    指定者:
      `load` 在接口中 `ServicesManager`
    类型参数:
      `T` - The service interface
    参数:
      `service` - The service interface
    返回:
      provider or null

  - ### getRegistration

    @Nullable public <T> @Nullable RegisteredServiceProvider<T> getRegistration(@NotNull @NotNull Class<T> service)
    Queries for a provider registration. This may return if no provider has been registered for a service.
    指定者:
      `getRegistration` 在接口中 `ServicesManager`
    类型参数:
      `T` - The service interface
    参数:
      `service` - The service interface
    返回:
      provider registration or null

  - ### getRegistrations

    @NotNull public @NotNull List<RegisteredServiceProvider<?>> getRegistrations(@NotNull @NotNull Plugin plugin)
    Get registrations of providers for a plugin.
    指定者:
      `getRegistrations` 在接口中 `ServicesManager`
    参数:
      `plugin` - The plugin
    返回:
      provider registrations

  - ### getRegistrations

    @NotNull public <T> @NotNull List<RegisteredServiceProvider<T>> getRegistrations(@NotNull @NotNull Class<T> service)
    Get registrations of providers for a service. The returned list is an unmodifiable copy.
    指定者:
      `getRegistrations` 在接口中 `ServicesManager`
    类型参数:
      `T` - The service interface
    参数:
      `service` - The service interface
    返回:
      a copy of the list of registrations

  - ### getKnownServices

    @NotNull public @NotNull Set<Class<?>> getKnownServices()
    Get a list of known services. A service is known if it has registered providers for it.
    指定者:
      `getKnownServices` 在接口中 `ServicesManager`
    返回:
      a copy of the set of known services

  - ### isProvidedFor

    public <T> boolean isProvidedFor(@NotNull @NotNull Class<T> service)
    Returns whether a provider has been registered for a service.
    指定者:
      `isProvidedFor` 在接口中 `ServicesManager`
    类型参数:
      `T` - service
    参数:
      `service` - service to check
    返回:
      true if and only if there are registered providers