Package org.bukkit
Interface Registry<T extends Keyed>
- Type Parameters:
- T- type of item in the registry
- All Superinterfaces:
- Iterable<T>
- All Known Implementing Classes:
- Registry.SimpleRegistry
Represents a registry of Bukkit objects that may be retrieved by
 
NamespacedKey.- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic final classRegistry.SimpleRegistry<T extends Enum<T> & Keyed>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Registry<Advancement> Deprecated.Advancement has no real server-side registry.Server art.Attribute.static final Registry<PatternType> Server banner patterns.Server biomes.Server block types.static final Registry<KeyedBossBar> Deprecated.BossBar has no real server-side registry.Server cat types.static final Registry<DamageType> Damage types.static final Registry<PotionEffectType> Server mob effects.static final Registry<Enchantment> Server enchantments.static final Registry<EntityType> Server entity types.Server fluids.static final Registry<Frog.Variant> Frog variants.Game events.static final Registry<MusicInstrument> Server instruments.Server item types.static final Registry<JukeboxSong> Jukebox songs.static final Registry<LootTables> Deprecated.LootTables, not to be confused with theLootTableclass, has no real server-side registry.static final Registry<MapCursor.Type> Map cursor types.Server materials.Memory Keys.Server menus.Server particles.static final Registry<PotionType> Server potions.Sound keys.Server statistics.Server structures.static final Registry<StructureType> Server structure types.static final Registry<TrimMaterial> Trim materials.static final Registry<TrimPattern> Trim patterns.static final Registry<Villager.Profession> Villager profession.static final Registry<Villager.Type> Villager type.static final Registry<Wolf.Variant> Wolf variants.
- 
Method SummaryModifier and TypeMethodDescriptionget(NamespacedKey key) Get the object by its key.getOrThrow(NamespacedKey key) Get the object by its key.default TAttempts to match the registered object with the given key.stream()Returns a new stream, which contains all registry items, which are registered to the registry.Methods inherited from interface java.lang.IterableforEach, iterator, spliterator
- 
Field Details- 
ADVANCEMENTDeprecated.Advancement has no real server-side registry.Server advancements.- See Also:
 
- 
ARTServer art.- See Also:
 
- 
ATTRIBUTEAttribute.- See Also:
 
- 
BANNER_PATTERNServer banner patterns.- See Also:
 
- 
BIOMEServer biomes.- See Also:
 
- 
BLOCKServer block types.- See Also:
- API Note:
- BlockType is not ready for public usage yet
 
- 
BOSS_BARSDeprecated.BossBar has no real server-side registry.Custom boss bars.- See Also:
 
- 
CAT_VARIANTServer cat types.- See Also:
 
- 
ENCHANTMENTServer enchantments.- See Also:
 
- 
ENTITY_TYPEServer entity types.- See Also:
 
- 
INSTRUMENTServer instruments.- See Also:
 
- 
ITEMServer item types.- See Also:
- API Note:
- ItemType is not ready for public usage yet
 
- 
LOOT_TABLESDeprecated.LootTables, not to be confused with theLootTableclass, has no real server-side registry.Default server loot tables.- See Also:
 
- 
MATERIALServer materials.- See Also:
 
- 
MENUServer menus.- See Also:
 
- 
EFFECTServer mob effects.- See Also:
 
- 
PARTICLE_TYPEServer particles.- See Also:
 
- 
POTIONServer potions.- See Also:
 
- 
STATISTICServer statistics.- See Also:
 
- 
STRUCTUREServer structures.- See Also:
 
- 
STRUCTURE_TYPEServer structure types.- See Also:
 
- 
SOUNDSSound keys.- See Also:
 
- 
TRIM_MATERIALTrim materials.- See Also:
 
- 
TRIM_PATTERNTrim patterns.- See Also:
 
- 
DAMAGE_TYPEDamage types.- See Also:
 
- 
JUKEBOX_SONGJukebox songs.- See Also:
 
- 
VILLAGER_PROFESSIONVillager profession.- See Also:
 
- 
VILLAGER_TYPEVillager type.- See Also:
 
- 
MEMORY_MODULE_TYPEMemory Keys.- See Also:
 
- 
FLUIDServer fluids.- See Also:
 
- 
FROG_VARIANTFrog variants.- See Also:
 
- 
WOLF_VARIANTWolf variants.- See Also:
 
- 
MAP_DECORATION_TYPEMap cursor types.- See Also:
 
- 
GAME_EVENTGame events.- See Also:
 
 
- 
- 
Method Details- 
getGet the object by its key.- Parameters:
- key- non-null key
- Returns:
- item or null if does not exist
 
- 
getOrThrowGet the object by its key. If there is no object with the given key, an exception will be thrown.- Parameters:
- key- to get the object from
- Returns:
- object with the given key
- Throws:
- IllegalArgumentException- if there is no object with the given key
 
- 
streamReturns a new stream, which contains all registry items, which are registered to the registry.- Returns:
- a stream of all registry items
 
- 
matchAttempts 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. - Parameters:
- input- non-null input
- Returns:
- registered object or null if does not exist
 
 
-