public interface WarnProcessorProvider
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.warn.processor.WarnProcessorProvider
The advantage of using a Provider instead of calling WarnManager.registerProcessor(String, WarnProcessor)
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 WarnProcessors MUST declare a dependency (hard or soft) on Negativity.
Modifier and Type | Method and Description |
---|---|
@Nullable WarnProcessor |
create(Adapter adapter)
Creates a WarnProcessor, 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 WarnProcessor 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 warn processornull
if the processor can't be used on the current system