registerBlockProvider

open fun registerBlockProvider(provider: BlockProvider, apiLevel: Int, plugin: Plugin): BlockProvider?(source)

Registers the given provider of blocks with normal priority.

Return

registered provider or null if it was not registered.

Since

0.11.0

Parameters

provider

The BlockProvider implementation.

apiLevel

Minimal required API level for this block provider implementation: - if the required API level is higher than installed Mimic, provider will not be registered, - if the required API level is lower - will be enabled compatibility mode. Specify MimicApiLevel.CURRENT to use API level of Mimic dependency used at compile time.

plugin

The plugin implementing this block provider.


abstract fun registerBlockProvider(provider: BlockProvider, apiLevel: Int, plugin: Plugin, priority: ServicePriority): BlockProvider?(source)

Registers the given provider of blocks.

Return

registered provider or null if it was not registered.

Since

0.11.0

Parameters

provider

The BlockProvider implementation.

apiLevel

Minimal required API level for this block provider implementation: - if the required API level is higher than installed Mimic, provider will not be registered, - if the required API level is lower - will be enabled compatibility mode. Specify MimicApiLevel.CURRENT to use API level of Mimic dependency used at compile time.

plugin

The plugin implementing this block provider.

priority

Default priority. A block recognized by several providers belongs to the provider with the highest priority.