程序包 org.bukkit

# 接口 Registry<T extends Keyed>

类型参数:
  `T` - type of item in the registry

所有超级接口:
  `Iterable<T>`

所有已知实现类:
  `Registry.SimpleRegistry`

public interface Registry<T extends Keyed> extends Iterable<T>
Represents a registry of Bukkit objects that may be retrieved by `NamespacedKey`.

- ## 嵌套类概要

  嵌套类
  修饰符和类型
  接口
  说明
  `static final class`
  `Registry.SimpleRegistry<T extends Enum<T> & Keyed>`

- ## 字段概要

  字段
  修饰符和类型
  字段
  说明
  `static final Registry<Advancement>`
  `ADVANCEMENT`
  Server advancements.
  `static final Registry<Art>`
  `ART`
  Server art.
  `static final Registry<Attribute>`
  `ATTRIBUTE`
  Attribute.
  `static final Registry<PatternType>`
  `BANNER_PATTERN`
  Server banner patterns.
  `static final Registry<Biome>`
  `BIOME`
  Server biomes.
  `static final Registry<BlockType>`
  `BLOCK`
  Server block types.
  `static final Registry<KeyedBossBar>`
  `BOSS_BARS`
  Custom boss bars.
  `static final Registry<Cat.Type>`
  `CAT_VARIANT`
  Server cat types.
  `static final Registry<DamageType>`
  `DAMAGE_TYPE`
  Damage types.
  `static final Registry<PotionEffectType>`
  `EFFECT`
  Server mob effects.
  `static final Registry<Enchantment>`
  `ENCHANTMENT`
  Server enchantments.
  `static final Registry<EntityType>`
  `ENTITY_TYPE`
  Server entity types.
  `static final Registry<Fluid>`
  `FLUID`
  Server fluids.
  `static final Registry<Frog.Variant>`
  `FROG_VARIANT`
  Frog variants.
  `static final Registry<GameEvent>`
  `GAME_EVENT`
  Game events.
  `static final Registry<MusicInstrument>`
  `INSTRUMENT`
  Server instruments.
  `static final Registry<ItemType>`
  `ITEM`
  Server item types.
  `static final Registry<JukeboxSong>`
  `JUKEBOX_SONG`
  Jukebox songs.
  `static final Registry<LootTables>`
  `LOOT_TABLES`
  Default server loot tables.
  `static final Registry<MapCursor.Type>`
  `MAP_DECORATION_TYPE`
  Map cursor types.
  `static final Registry<Material>`
  `MATERIAL`
  Server materials.
  `static final Registry<MemoryKey>`
  `MEMORY_MODULE_TYPE`
  Memory Keys.
  `static final Registry<Particle>`
  `PARTICLE_TYPE`
  Server particles.
  `static final Registry<PotionType>`
  `POTION`
  Server potions.
  `static final Registry<Sound>`
  `SOUNDS`
  Sound keys.
  `static final Registry<Statistic>`
  `STATISTIC`
  Server statistics.
  `static final Registry<Structure>`
  `STRUCTURE`
  Server structures.
  `static final Registry<StructureType>`
  `STRUCTURE_TYPE`
  Server structure types.
  `static final Registry<TrimMaterial>`
  `TRIM_MATERIAL`
  Trim materials.
  `static final Registry<TrimPattern>`
  `TRIM_PATTERN`
  Trim patterns.
  `static final Registry<Villager.Profession>`
  `VILLAGER_PROFESSION`
  Villager profession.
  `static final Registry<Villager.Type>`
  `VILLAGER_TYPE`
  Villager type.
  `static final Registry<Wolf.Variant>`
  `WOLF_VARIANT`
  Wolf variants.

- ## 方法概要

  修饰符和类型
  方法
  说明
  `T`
  `get(@NotNull NamespacedKey key)`
  Get the object by its key.
  `default T`
  `match(@NotNull String input)`
  Attempts to match the registered object with the given key.
  `@NotNull Stream<T>`
  `stream()`
  Returns a new stream, which contains all registry items, which are registered to the registry.

  ### 从接口继承的方法 java.lang.Iterable

  `forEach, iterator, spliterator`

- ## 字段详细资料

  - ### ADVANCEMENT

    static final Registry<Advancement> ADVANCEMENT
    Server advancements.
    另请参阅:
      - `Bukkit.getAdvancement(org.bukkit.NamespacedKey)`
      - `Bukkit.advancementIterator()`

  - ### ART

    static final Registry<Art> ART
    Server art.
    另请参阅:
      - `Art`

  - ### ATTRIBUTE

    static final Registry<Attribute> ATTRIBUTE
    Attribute.
    另请参阅:
      - `Attribute`

  - ### BANNER_PATTERN

    static final Registry<PatternType> BANNER_PATTERN
    Server banner patterns.
    另请参阅:
      - `PatternType`

  - ### BIOME

    static final Registry<Biome> BIOME
    Server biomes.
    另请参阅:
      - `Biome`

  - ### BLOCK

    @Internal static final Registry<BlockType> BLOCK
    Server block types.
    另请参阅:
      - `BlockType`

  - ### BOSS_BARS

    static final Registry<KeyedBossBar> BOSS_BARS
    Custom boss bars.
    另请参阅:
      - `Bukkit.getBossBar(org.bukkit.NamespacedKey)`
      - `Bukkit.getBossBars()`

  - ### CAT_VARIANT

    static final Registry<Cat.Type> CAT_VARIANT
    Server cat types.
    另请参阅:
      - `Cat.Type`

  - ### ENCHANTMENT

    static final Registry<Enchantment> ENCHANTMENT
    Server enchantments.
    另请参阅:
      - `Enchantment`

  - ### ENTITY_TYPE

    static final Registry<EntityType> ENTITY_TYPE
    Server entity types.
    另请参阅:
      - `EntityType`

  - ### INSTRUMENT

    static final Registry<MusicInstrument> INSTRUMENT
    Server instruments.
    另请参阅:
      - `MusicInstrument`

  - ### ITEM

    @Internal static final Registry<ItemType> ITEM
    Server item types.
    另请参阅:
      - `ItemType`

  - ### LOOT_TABLES

    static final Registry<LootTables> LOOT_TABLES
    Default server loot tables.
    另请参阅:
      - `LootTables`

  - ### MATERIAL

    static final Registry<Material> MATERIAL
    Server materials.
    另请参阅:
      - `Material`

  - ### EFFECT

    static final Registry<PotionEffectType> EFFECT
    Server mob effects.
    另请参阅:
      - `PotionEffectType`

  - ### PARTICLE_TYPE

    static final Registry<Particle> PARTICLE_TYPE
    Server particles.
    另请参阅:
      - `Particle`

  - ### POTION

    static final Registry<PotionType> POTION
    Server potions.
    另请参阅:
      - `PotionType`

  - ### STATISTIC

    static final Registry<Statistic> STATISTIC
    Server statistics.
    另请参阅:
      - `Statistic`

  - ### STRUCTURE

    static final Registry<Structure> STRUCTURE
    Server structures.
    另请参阅:
      - `Structure`

  - ### STRUCTURE_TYPE

    static final Registry<StructureType> STRUCTURE_TYPE
    Server structure types.
    另请参阅:
      - `StructureType`

  - ### SOUNDS

    static final Registry<Sound> SOUNDS
    Sound keys.
    另请参阅:
      - `Sound`

  - ### TRIM_MATERIAL

    @Experimental static final Registry<TrimMaterial> TRIM_MATERIAL
    Trim materials.
    另请参阅:
      - `TrimMaterial`

  - ### TRIM_PATTERN

    @Experimental static final Registry<TrimPattern> TRIM_PATTERN
    Trim patterns.
    另请参阅:
      - `TrimPattern`

  - ### DAMAGE_TYPE

    @Experimental static final Registry<DamageType> DAMAGE_TYPE
    Damage types.
    另请参阅:
      - `DamageType`

  - ### JUKEBOX_SONG

    @Experimental static final Registry<JukeboxSong> JUKEBOX_SONG
    Jukebox songs.
    另请参阅:
      - `JukeboxSong`

  - ### VILLAGER_PROFESSION

    static final Registry<Villager.Profession> VILLAGER_PROFESSION
    Villager profession.
    另请参阅:
      - `Villager.Profession`

  - ### VILLAGER_TYPE

    static final Registry<Villager.Type> VILLAGER_TYPE
    Villager type.
    另请参阅:
      - `Villager.Type`

  - ### MEMORY_MODULE_TYPE

    static final Registry<MemoryKey> MEMORY_MODULE_TYPE
    Memory Keys.
    另请参阅:
      - `MemoryKey`

  - ### FLUID

    static final Registry<Fluid> FLUID
    Server fluids.
    另请参阅:
      - `Fluid`

  - ### FROG_VARIANT

    static final Registry<Frog.Variant> FROG_VARIANT
    Frog variants.
    另请参阅:
      - `Frog.Variant`

  - ### WOLF_VARIANT

    static final Registry<Wolf.Variant> WOLF_VARIANT
    Wolf variants.
    另请参阅:
      - `Wolf.Variant`

  - ### MAP_DECORATION_TYPE

    static final Registry<MapCursor.Type> MAP_DECORATION_TYPE
    Map cursor types.
    另请参阅:
      - `MapCursor.Type`

  - ### GAME_EVENT

    static final Registry<GameEvent> GAME_EVENT
    Game events.
    另请参阅:
      - `GameEvent`

- ## 方法详细资料

  - ### get

    @Nullable T get(@NotNull @NotNull NamespacedKey key)
    Get the object by its key.
    参数:
      `key` - non-null key
    返回:
      item or null if does not exist

  - ### stream

    @NotNull @NotNull Stream<T> stream()
    Returns a new stream, which contains all registry items, which are registered to the registry.
    返回:
      a stream of all registry items

  - ### match

    @Nullable default T match(@NotNull @NotNull String input)
    Attempts to match the registered object with the given key.

    This will attempt to find a reasonable match based on the provided input and may do so through unspecified means.

    参数:
      `input` - non-null input
    返回:
      registered object or null if does not exist