public interface BanProcessorProvider
ServiceLoader
mechanism.
To register a provider add the fully qualified name of the class implementing Provider
to the file
META-INF/services/com.elikill58.negativity.universal.ban.processor.BanProcessorProvider
The advantage of using a Provider instead of calling BanManager.registerProcessor(String, BanProcessor)
yourself is that it is guaranteed that your BanProcessor will be registered at the right time,
and will be registered again if Negativity reloads without your plugin noticing.
Plugins providing BanProcessors MUST declare a dependency (hard or soft) on Negativity.
Modifier and Type | Method and Description |
---|---|
@Nullable BanProcessor |
create(Adapter adapter)
Creates a BanProcessor, or returns
null if it can't be used on the current system
(missing plugin dependency, disabled in configuration, etc...) |
String |
getId() |
String getId()
@Nullable BanProcessor create(Adapter adapter)
null
if it can't be used on the current system
(missing plugin dependency, disabled in configuration, etc...)adapter
- the actual adapter used to create processornull
if the processor can't be used on the current system