Interface TagChannel
- All Known Implementing Classes:
ModuleContributions
@Experimental
@NonExtendable
public interface TagChannel
Item and enchantment tag changes declared by one module.
Experimental: these channels use Paper's bootstrap lifecycle and
RegistryEvents.ENCHANTMENT.
Paper 26.3 marks PluginBootstrap, LifecycleEvents.TAGS,
LifecycleEvents.DATAPACK_DISCOVERY and io.papermc.paper.registry.tag.Tag experimental.
A later 7.x release may adapt this interface to Paper changes; see COMPATIBILITY.md.- Since:
- 7.0.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<T extends org.bukkit.Keyed>
voidaddToTag(io.papermc.paper.registry.RegistryKey<T> registry, net.kyori.adventure.key.Key tag, Collection<net.kyori.adventure.key.Key> values) Adds values to an existing or new tag of the given registry; any namespace may be extended.<T extends org.bukkit.Keyed>
voidsetTag(io.papermc.paper.registry.RegistryKey<T> registry, net.kyori.adventure.key.Key tag, Collection<net.kyori.adventure.key.Key> values) Creates or replaces a tag in this module's namespace with exactly these values.
-
Field Details
-
SUPPORTED
The registries available to this channel.
-
-
Method Details
-
addToTag
<T extends org.bukkit.Keyed> void addToTag(io.papermc.paper.registry.RegistryKey<T> registry, net.kyori.adventure.key.Key tag, Collection<net.kyori.adventure.key.Key> values) Adds values to an existing or new tag of the given registry; any namespace may be extended.- Type Parameters:
T- the registry value type- Parameters:
registry- a supported registrytag- the tag keyvalues- the entry keys to add- Throws:
IllegalArgumentException- if the registry is not supportedIllegalStateException- if called after bootstrap() returned
-
setTag
<T extends org.bukkit.Keyed> void setTag(io.papermc.paper.registry.RegistryKey<T> registry, net.kyori.adventure.key.Key tag, Collection<net.kyori.adventure.key.Key> values) Creates or replaces a tag in this module's namespace with exactly these values.- Type Parameters:
T- the registry value type- Parameters:
registry- a supported registrytag- the tag keyvalues- the replacement entry keys- Throws:
IllegalArgumentException- if the registry is not supported or the tag is outside this module's namespaceIllegalStateException- if called after bootstrap() returned
-