程序包 org.bukkit
接口 Registry<T extends Keyed>
- 类型参数:
T
- type of item in the registry
- 所有超级接口:
Iterable<T>
- 所有已知实现类:
Registry.SimpleRegistry
Represents a registry of Bukkit objects that may be retrieved by
NamespacedKey
.-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明static final Registry<Advancement>
已过时。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>
已过时。BossBar has no real server-side registry.Server cat types.static final Registry<Chicken.Variant>
Server chicken variants.static final Registry<Cow.Variant>
Server cow variants.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>
已过时。LootTables, not to be confused with theLootTable
class, 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<Pig.Variant>
Server pig variants.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. -
方法概要
修饰符和类型方法说明get
(@NotNull NamespacedKey key) Get the object by its key.Get the object by its key.default T
Attempts 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.从接口继承的方法 java.lang.Iterable
forEach, iterator, spliterator
-
字段详细资料
-
ADVANCEMENT
已过时。Advancement has no real server-side registry.Server advancements. -
ART
Server art.- 另请参阅:
-
ATTRIBUTE
Attribute.- 另请参阅:
-
BANNER_PATTERN
Server banner patterns.- 另请参阅:
-
BIOME
Server biomes.- 另请参阅:
-
BLOCK
Server block types.- 另请参阅:
-
BOSS_BARS
已过时。BossBar has no real server-side registry.Custom boss bars. -
CAT_VARIANT
Server cat types.- 另请参阅:
-
PIG_VARIANT
Server pig variants.- 另请参阅:
-
COW_VARIANT
Server cow variants.- 另请参阅:
-
CHICKEN_VARIANT
Server chicken variants.- 另请参阅:
-
ENCHANTMENT
Server enchantments.- 另请参阅:
-
ENTITY_TYPE
Server entity types.- 另请参阅:
-
INSTRUMENT
Server instruments.- 另请参阅:
-
ITEM
Server item types.- 另请参阅:
-
LOOT_TABLES
已过时。LootTables, not to be confused with theLootTable
class, has no real server-side registry.Default server loot tables.- 另请参阅:
-
MATERIAL
Server materials.- 另请参阅:
-
MENU
Server menus.- 另请参阅:
-
EFFECT
Server mob effects.- 另请参阅:
-
PARTICLE_TYPE
Server particles.- 另请参阅:
-
POTION
Server potions.- 另请参阅:
-
STATISTIC
Server statistics.- 另请参阅:
-
STRUCTURE
Server structures.- 另请参阅:
-
STRUCTURE_TYPE
Server structure types.- 另请参阅:
-
SOUNDS
Sound keys.- 另请参阅:
-
TRIM_MATERIAL
Trim materials.- 另请参阅:
-
TRIM_PATTERN
Trim patterns.- 另请参阅:
-
DAMAGE_TYPE
Damage types.- 另请参阅:
-
JUKEBOX_SONG
Jukebox songs.- 另请参阅:
-
VILLAGER_PROFESSION
Villager profession.- 另请参阅:
-
VILLAGER_TYPE
Villager type.- 另请参阅:
-
MEMORY_MODULE_TYPE
Memory Keys.- 另请参阅:
-
FLUID
Server fluids.- 另请参阅:
-
FROG_VARIANT
Frog variants.- 另请参阅:
-
WOLF_VARIANT
Wolf variants.- 另请参阅:
-
MAP_DECORATION_TYPE
Map cursor types.- 另请参阅:
-
GAME_EVENT
Game events.- 另请参阅:
-
-
方法详细资料
-
get
Get the object by its key.- 参数:
key
- non-null key- 返回:
- item or null if does not exist
-
getOrThrow
Get the object by its key. If there is no object with the given key, an exception will be thrown.- 参数:
key
- to get the object from- 返回:
- object with the given key
- 抛出:
IllegalArgumentException
- if there is no object with the given key
-
stream
Returns a new stream, which contains all registry items, which are registered to the registry.- 返回:
- a stream of all registry items
-
match
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
-