UEAPIRegistry

@Since(version = "2.2")
interface UEAPIRegistry

This is the registry class. This class is used to register triggers, placeholders, and many other things. It is also used to retrieve them.

Note that this class should only ever be implemented by UnderscoreEnchants.

See also

Properties

Link copied to clipboard
@Since(version = "2.2")
abstract val registeredActions: List<RegistrableAction>

An immutable copy of all registered actions.

Link copied to clipboard

An immutable copy of all registered activation indicators.

Link copied to clipboard
@Since(version = "2.2")
abstract val registeredApplicables: List<RegistrableApplicable>

An immutable copy of all registered applicables.

Link copied to clipboard
@Since(version = "2.2")
abstract val registeredConditions: List<RegistrableCondition>

An immutable copy of all registered conditions.

Link copied to clipboard

An immutable copy of all registered enchantments.

Link copied to clipboard

An immutable copy of all registered enchantment seekers.

Link copied to clipboard

An immutable copy of all registered enchantment placeholders.

Link copied to clipboard
@Since(version = "2.2")
abstract val registeredTriggers: List<RegistrableTrigger>

An immutable copy of all registered triggers.

Functions

Link copied to clipboard
@Since(version = "2.2")
abstract fun findAction(name: String): RegistrableAction?

This method finds an action by its name (alias).

Link copied to clipboard
@Since(version = "2.2")
abstract fun findActions(plugin: JavaPlugin): List<RegistrableAction>

This method finds all actions by a plugin that has registered it. Note that the list may be empty.

Link copied to clipboard
@Since(version = "2.2")
abstract fun findApplicable(name: String): RegistrableApplicable?

This method finds an applicable by its name (alias).

Link copied to clipboard
@Since(version = "2.2")
abstract fun findApplicables(plugin: JavaPlugin): List<RegistrableApplicable>

This method finds all applicables by a plugin that has registered it. Note that the list may be empty.

Link copied to clipboard
@Since(version = "2.2")
abstract fun findCondition(name: String): RegistrableCondition?

This method finds a condition by its name (alias).

Link copied to clipboard
@Since(version = "2.2")
abstract fun findConditions(plugin: JavaPlugin): List<RegistrableCondition>

This method finds all conditions by a plugin that has registered it. Note that the list may be empty.

Link copied to clipboard
@Since(version = "2.2")
abstract fun findEnchantment(name: String): RegistrableEnchantment?

This method finds an enchantment by its name (alias).

Link copied to clipboard
@Since(version = "2.2")
abstract fun findEnchantmentByKey(key: NamespacedKey): RegistrableEnchantment?

Finds an enchantment by a NamespacedKey.

Link copied to clipboard
@Since(version = "2.2")
abstract fun findEnchantmentByKeyString(keyString: String): RegistrableEnchantment?

Finds an enchantment by its keyString (e.g. "test_enchantment" in "underscore:test_enchantment"). Returns null if none is found.

Link copied to clipboard
@Since(version = "2.2")
abstract fun findEnchantmentPack(name: String): EnchantmentPack?

This method finds an enchantment pack by its name. While an enchantment pack is not a registrable object, it is a container for registrable enchantments, and as such is stored inside the registry for convenience.

Link copied to clipboard
@Since(version = "2.2")
abstract fun findEnchantments(plugin: JavaPlugin): List<RegistrableEnchantment>

This method finds all enchantments by a plugin that has registered it. Note that the list may be empty.

Link copied to clipboard
@Since(version = "2.2")
abstract fun findIndicator(name: String): RegistrableActivationIndicator?

This method finds an activation indicator by its name (alias).

Link copied to clipboard
@Since(version = "2.2")
abstract fun findIndicators(plugin: JavaPlugin): List<RegistrableActivationIndicator>

This method finds all activation indicators by plugin plugin that has registered it. Note that the list may be empty.

Link copied to clipboard
@Since(version = "2.2")
abstract fun findPlaceholder(name: String): RegistrablePlaceholder?

This method finds a placeholder by its name (alias).

Link copied to clipboard
@Since(version = "2.2")
abstract fun findPlaceholders(plugin: JavaPlugin): List<RegistrablePlaceholder>

This method finds all placeholders by a plugin that has registered it. Note that the list may be empty.

Link copied to clipboard
@Since(version = "2.2")
abstract fun findSeeker(name: String): RegistrableEnchantmentSeeker?

This method finds an enchantment seeker by its name (alias).

Link copied to clipboard
@Since(version = "2.2")
abstract fun findSeekers(plugin: JavaPlugin): List<RegistrableEnchantmentSeeker>

This method finds all enchantment seekers by plugin plugin that has registered it. Note that the list may be empty.

Link copied to clipboard
@Since(version = "2.2")
abstract fun findTrigger(name: String): RegistrableTrigger?

This method finds a trigger by its name (alias).

Link copied to clipboard
@Since(version = "2.2")
abstract fun findTriggers(plugin: JavaPlugin): List<RegistrableTrigger>

This method finds all triggers by a plugin that has registered it. Note that the list may be empty.

Link copied to clipboard
@Since(version = "2.2")
abstract fun provide(provider: RegistrablesProvider)

Provides a RegistrablesProvider to the API to register new items.

Link copied to clipboard
@Since(version = "2.2")
abstract fun refresh()

Refreshes a registry. This clears all loaded registrables, except for enchantments, then loads them again from enabled providers.