Interface MutableRegistry<T extends org.bukkit.Keyed>

Type Parameters:
T - the type of the entries in the registry
All Superinterfaces:
Iterable<T>, org.bukkit.Registry<T>
All Known Implementing Classes:
MutableRegistry.SimpleMutableRegistry

public interface MutableRegistry<T extends org.bukkit.Keyed> extends org.bukkit.Registry<T>
A mutable Registry that allows adding and overwriting entries.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    MutableRegistry.SimpleMutableRegistry<T extends org.bukkit.Keyed>
    A simple implementation of MutableRegistry, backed by a hash map.

    Nested classes/interfaces inherited from interface org.bukkit.Registry

    org.bukkit.Registry.NotARegistry<A extends org.bukkit.Keyed>, org.bukkit.Registry.SimpleRegistry<T extends Enum<T> & org.bukkit.Keyed>
  • Field Summary

    Fields inherited from interface org.bukkit.Registry

    ADVANCEMENT, ART, ATTRIBUTE, BANNER_PATTERN, BIOME, BLOCK, BOSS_BARS, CAT_VARIANT, DAMAGE_TYPE, DATA_COMPONENT_TYPE, EFFECT, ENCHANTMENT, ENTITY_TYPE, FLUID, FROG_VARIANT, GAME_EVENT, GAME_RULE, INSTRUMENT, ITEM, JUKEBOX_SONG, LOOT_TABLES, MAP_DECORATION_TYPE, MATERIAL, MEMORY_MODULE_TYPE, MENU, MOB_EFFECT, PARTICLE_TYPE, POTION, POTION_EFFECT_TYPE, SOUND_EVENT, SOUNDS, STATISTIC, STRUCTURE, STRUCTURE_TYPE, TRIM_MATERIAL, TRIM_PATTERN, VILLAGER_PROFESSION, VILLAGER_TYPE, WOLF_VARIANT
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(T entry)
    Tries to add the given entry to the registry.
    void
    overwrite(T entry)
    Adds (or, if it already exists, overwrites) the given entry to the registry.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator

    Methods inherited from interface org.bukkit.Registry

    get, get, get, getKey, getKeyOrThrow, getOrThrow, getOrThrow, getOrThrow, getTag, getTags, getTagValues, hasTag, keyStream, match, size, stream