Package org.bukkit.registry
Interface RegistryAware
- All Known Subinterfaces:
- Art,- Attribute,- Biome,- BlockType,- BlockType.Typed<B>,- Cat.Type,- DamageType,- Fluid,- Frog.Variant,- ItemType,- ItemType.Typed<M>,- JukeboxSong,- MapCursor.Type,- MenuType,- MenuType.Typed<V,,- B> - PatternType,- Sound,- TrimMaterial,- TrimPattern,- Villager.Profession,- Villager.Type,- Wolf.Variant
- All Known Implementing Classes:
- Enchantment,- EnchantmentWrapper,- EntityType,- GameEvent,- Material,- MemoryKey,- MusicInstrument,- Particle,- PotionEffectType,- PotionEffectTypeWrapper,- PotionType,- Structure,- StructureType
public interface RegistryAware
Indicates that instances of a class may be registered to the server and have a key associated with them.
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionGets the key of this instance if it is registered otherwise returnsnull.Gets the key of this instance if it is registered otherwise throws an error.booleanReturns whether this instance is register in a registry and therefore has a key or not.
- 
Method Details- 
getKeyOrThrowGets the key of this instance if it is registered otherwise throws an error.
 This is a convenience method and plugins should always checkisRegistered()before using this method.- Returns:
- the key with which this instance is registered.
- Throws:
- IllegalStateException- if this instance is not registered.
- See Also:
 
- 
getKeyOrNullGets the key of this instance if it is registered otherwise returnsnull.- Returns:
- the key with which this instance is registered or nullif not registered.
- See Also:
 
- 
isRegisteredboolean isRegistered()Returns whether this instance is register in a registry and therefore has a key or not.- Returns:
- true, if this instance is registered. Otherwise, false.
- See Also:
 
 
-