Uses of Class
org.bukkit.NamespacedKey
Package
Description
The root package of the Bukkit API, contains generalized API classes.
Classes relevant to attributes.
Classes used to manipulate the voxels in a
world
,
including special states.Classes relevant to banner blocks.
Classes relating to the specialized enhancements to
item stacks
, as part of the meta data
.Interfaces for non-voxel objects that can exist in a
world
, including all players, monsters, projectiles, etc.Classes concerning an entity's persistent memory.
Classes involved in manipulating player inventories and item interactions.
The interfaces used when manipulating extra data can can be stored inside
item stacks
.Isolated components which may form part of item meta.
Classes that allow attaching custom data to items.
Classes relevant to loot table manipulation and generation.
Classes dedicated to handling data pack information.
Classes that allow attaching persistent data to various objects.
Classes to represent various
potion
properties and manipulation.Classes related to creating or using
structures
without creating Structure
blocks
in the world.-
Uses of NamespacedKey in org.bukkit
Modifier and TypeMethodDescriptionstatic NamespacedKey
NamespacedKey.fromString
(String key) Get a NamespacedKey from the supplied string.static NamespacedKey
NamespacedKey.fromString
(String string, Plugin defaultNamespace) Get a NamespacedKey from the supplied string with a default namespace if a namespace is not defined.Keyed.getKey()
Return the namespaced identifier for this object.Material.getKey()
Particle.getKey()
Statistic.getKey()
StructureType.getKey()
Deprecated.static NamespacedKey
Get a key in the Minecraft namespace.static NamespacedKey
NamespacedKey.randomKey()
Deprecated.should never be used by plugins, for internal use only!!Modifier and TypeMethodDescriptionstatic KeyedBossBar
Bukkit.createBossBar
(NamespacedKey key, String title, BarColor color, BarStyle style, BarFlag... flags) Creates a boss bar instance to display to players.Server.createBossBar
(NamespacedKey key, String title, BarColor color, BarStyle style, BarFlag... flags) Creates a boss bar instance to display to players.Registry.get
(NamespacedKey key) Get the object by its key.Registry.SimpleRegistry.get
(NamespacedKey key) <B extends Keyed>
BUnsafeValues.get
(Registry<B> registry, NamespacedKey key) Deprecated.static Advancement
Bukkit.getAdvancement
(NamespacedKey key) Get the advancement specified by this key.Server.getAdvancement
(NamespacedKey key) Get the advancement specified by this key.static KeyedBossBar
Bukkit.getBossBar
(NamespacedKey key) Gets theKeyedBossBar
specified by this key.Server.getBossBar
(NamespacedKey key) Gets theKeyedBossBar
specified by this key.static GameEvent
GameEvent.getByKey
(NamespacedKey namespacedKey) Deprecated.UseRegistry.get(NamespacedKey)
instead.static MusicInstrument
MusicInstrument.getByKey
(NamespacedKey namespacedKey) Deprecated.UseRegistry.get(NamespacedKey)
instead.UnsafeValues.getFeatureFlag
(NamespacedKey key) Deprecated.UnsafeValues.getInternalPotionData
(NamespacedKey key) Deprecated, for removal: This API element is subject to removal in a future version.static LootTable
Bukkit.getLootTable
(NamespacedKey key) Gets the specifiedLootTable
.Server.getLootTable
(NamespacedKey key) Gets the specifiedLootTable
.Registry.getOrThrow
(NamespacedKey key) Get the object by its key.Registry.SimpleRegistry.getOrThrow
(NamespacedKey key) static Recipe
Bukkit.getRecipe
(NamespacedKey recipeKey) Get theRecipe
for the given key.Server.getRecipe
(NamespacedKey recipeKey) Get theRecipe
for the given key.Bukkit.getTag
(String registry, NamespacedKey tag, Class<T> clazz) Gets a tag which has already been defined within the server.Server.getTag
(String registry, NamespacedKey tag, Class<T> clazz) Gets a tag which has already been defined within the server.UnsafeValues.loadAdvancement
(NamespacedKey key, String advancement) Deprecated.Load an advancement represented by the specified string into the server.boolean
UnsafeValues.removeAdvancement
(NamespacedKey key) Deprecated.Delete an advancement which was loaded and saved byUnsafeValues.loadAdvancement(org.bukkit.NamespacedKey, java.lang.String)
.static boolean
Bukkit.removeBossBar
(NamespacedKey key) Removes aKeyedBossBar
specified by this key.boolean
Server.removeBossBar
(NamespacedKey key) Removes aKeyedBossBar
specified by this key.static boolean
Bukkit.removeRecipe
(NamespacedKey key) Remove a recipe from the server.boolean
Server.removeRecipe
(NamespacedKey key) Remove a recipe from the server. -
Uses of NamespacedKey in org.bukkit.attribute
ModifierConstructorDescriptionAttributeModifier
(NamespacedKey key, double amount, AttributeModifier.Operation operation, EquipmentSlotGroup slot) -
Uses of NamespacedKey in org.bukkit.block
Modifier and TypeMethodDescriptionSkull.getNoteBlockSound()
Gets the sound to play if the skull is placed on a note block.Modifier and TypeMethodDescriptionvoid
Skull.setNoteBlockSound
(NamespacedKey noteBlockSound) Sets the sound to play if the skull is placed on a note block. -
Uses of NamespacedKey in org.bukkit.block.banner
-
Uses of NamespacedKey in org.bukkit.enchantments
Modifier and TypeMethodDescriptionstatic Enchantment
Enchantment.getByKey
(NamespacedKey key) Deprecated.only for backwards compatibility, useRegistry.get(NamespacedKey)
instead -
Uses of NamespacedKey in org.bukkit.entity
Modifier and TypeMethodDescriptionHumanEntity.getDiscoveredRecipes()
Get an immutable set of recipes this entity has discovered.Modifier and TypeMethodDescriptionboolean
HumanEntity.discoverRecipe
(NamespacedKey recipe) Discover a recipe for this player such that it has not already been discovered.boolean
HumanEntity.hasDiscoveredRecipe
(NamespacedKey recipe) Check whether or not this entity has discovered the specified recipe.CompletableFuture
<byte[]> Player.retrieveCookie
(NamespacedKey key) Retrieves a cookie from this player.void
Player.storeCookie
(NamespacedKey key, byte[] value) Stores a cookie in this player's client.boolean
HumanEntity.undiscoverRecipe
(NamespacedKey recipe) Undiscover a recipe for this player such that it has already been discovered.Modifier and TypeMethodDescriptionint
HumanEntity.discoverRecipes
(Collection<NamespacedKey> recipes) Discover a collection of recipes for this player such that they have not already been discovered.int
HumanEntity.undiscoverRecipes
(Collection<NamespacedKey> recipes) Undiscover a collection of recipes for this player such that they have already been discovered. -
Uses of NamespacedKey in org.bukkit.entity.memory
Modifier and TypeMethodDescriptionstatic MemoryKey
MemoryKey.getByKey
(NamespacedKey namespacedKey) Returns aMemoryKey
by aNamespacedKey
. -
Uses of NamespacedKey in org.bukkit.event.player
Modifier and TypeMethodDescriptionPlayerRecipeDiscoverEvent.getRecipe()
Get the namespaced key of the discovered recipe. -
Uses of NamespacedKey in org.bukkit.event.world
Modifier and TypeMethodDescriptionAsyncStructureGenerateEvent.getBlockTransformers()
Gets all block transformers in a unmodifiable map.AsyncStructureGenerateEvent.getEntityTransformers()
Gets all entity transformers in a unmodifiable map.Modifier and TypeMethodDescriptionAsyncStructureGenerateEvent.getBlockTransformer
(NamespacedKey key) Gets a block transformer by key.AsyncStructureGenerateEvent.getEntityTransformer
(NamespacedKey key) Gets a entity transformer by key.void
AsyncStructureGenerateEvent.removeBlockTransformer
(NamespacedKey key) Removes a block transformer.void
AsyncStructureGenerateEvent.removeEntityTransformer
(NamespacedKey key) Removes a entity transformer.void
AsyncStructureGenerateEvent.setBlockTransformer
(NamespacedKey key, BlockTransformer transformer) Sets a block transformer to a key.void
AsyncStructureGenerateEvent.setEntityTransformer
(NamespacedKey key, EntityTransformer transformer) Sets a entity transformer to a key. -
Uses of NamespacedKey in org.bukkit.inventory
Modifier and TypeMethodDescriptionCookingRecipe.getKey()
CraftingRecipe.getKey()
SmithingRecipe.getKey()
StonecuttingRecipe.getKey()
ModifierConstructorDescriptionBlastingRecipe
(NamespacedKey key, ItemStack result, RecipeChoice input, float experience, int cookingTime) BlastingRecipe
(NamespacedKey key, ItemStack result, Material source, float experience, int cookingTime) CampfireRecipe
(NamespacedKey key, ItemStack result, RecipeChoice input, float experience, int cookingTime) CampfireRecipe
(NamespacedKey key, ItemStack result, Material source, float experience, int cookingTime) CookingRecipe
(NamespacedKey key, ItemStack result, RecipeChoice input, float experience, int cookingTime) Create a cooking recipe to craft the specified ItemStack.CookingRecipe
(NamespacedKey key, ItemStack result, Material source, float experience, int cookingTime) Create a cooking recipe to craft the specified ItemStack.protected
CraftingRecipe
(NamespacedKey key, ItemStack result) FurnaceRecipe
(NamespacedKey key, ItemStack result, RecipeChoice input, float experience, int cookingTime) Create a furnace recipe to craft the specified ItemStack.FurnaceRecipe
(NamespacedKey key, ItemStack result, Material source, float experience, int cookingTime) Create a furnace recipe to craft the specified ItemStack.FurnaceRecipe
(NamespacedKey key, ItemStack result, Material source, int data, float experience, int cookingTime) Deprecated.ShapedRecipe
(NamespacedKey key, ItemStack result) Create a shaped recipe to craft the specified ItemStack.ShapelessRecipe
(NamespacedKey key, ItemStack result) Create a shapeless recipe to craft the specified ItemStack.SmithingRecipe
(NamespacedKey key, ItemStack result, RecipeChoice base, RecipeChoice addition) Deprecated.as of Minecraft 1.20, smithing recipes are now separated into two distinct recipe types,SmithingTransformRecipe
andSmithingTrimRecipe
.SmithingTransformRecipe
(NamespacedKey key, ItemStack result, RecipeChoice template, RecipeChoice base, RecipeChoice addition) Create a smithing recipe to produce the specified result ItemStack.SmithingTrimRecipe
(NamespacedKey key, RecipeChoice template, RecipeChoice base, RecipeChoice addition) Create a smithing recipe to produce the specified result ItemStack.SmokingRecipe
(NamespacedKey key, ItemStack result, RecipeChoice input, float experience, int cookingTime) SmokingRecipe
(NamespacedKey key, ItemStack result, Material source, float experience, int cookingTime) StonecuttingRecipe
(NamespacedKey key, ItemStack result, RecipeChoice input) Create a cooking recipe to craft the specified ItemStack.StonecuttingRecipe
(NamespacedKey key, ItemStack result, Material source) Create a Stonecutting recipe to craft the specified ItemStack.TransmuteRecipe
(NamespacedKey key, Material result, RecipeChoice input, RecipeChoice material) Create a transmute recipe to produce a result of the specified type. -
Uses of NamespacedKey in org.bukkit.inventory.meta
Modifier and TypeMethodDescriptionItemMeta.getItemModel()
Gets the custom item model.SkullMeta.getNoteBlockSound()
Gets the sound to play if the skull is placed on a note block.ItemMeta.getTooltipStyle()
Gets the custom tooltip style.Modifier and TypeMethodDescriptionKnowledgeBookMeta.getRecipes()
Gets all the recipes in the book.Modifier and TypeMethodDescriptionvoid
KnowledgeBookMeta.addRecipe
(NamespacedKey... recipes) Adds new recipe to the end of the book.void
ItemMeta.setItemModel
(NamespacedKey itemModel) Sets the custom item model.void
SkullMeta.setNoteBlockSound
(NamespacedKey noteBlockSound) Sets the sound to play if the skull is placed on a note block.void
ItemMeta.setTooltipStyle
(NamespacedKey tooltipStyle) Sets the custom tooltip style.Modifier and TypeMethodDescriptionvoid
KnowledgeBookMeta.setRecipes
(List<NamespacedKey> recipes) Clears the existing book recipes, and sets the book to use the provided recipes. -
Uses of NamespacedKey in org.bukkit.inventory.meta.components
Modifier and TypeMethodDescriptionEquippableComponent.getCameraOverlay()
Gets the key of the camera overlay to use when equipped.UseCooldownComponent.getCooldownGroup()
Gets the custom cooldown group to be used for similar items, if set.EquippableComponent.getModel()
Gets the key of the model to use when equipped.JukeboxPlayableComponent.getSongKey()
Gets the key of the song assigned to this component.Modifier and TypeMethodDescriptionvoid
EquippableComponent.setCameraOverlay
(NamespacedKey key) Sets the key of the camera overlay to use when equipped.void
UseCooldownComponent.setCooldownGroup
(NamespacedKey song) Sets the custom cooldown group to be used for similar items.void
EquippableComponent.setModel
(NamespacedKey key) Sets the key of the model to use when equipped.void
JukeboxPlayableComponent.setSongKey
(NamespacedKey song) Sets the key of the song assigned to this component. -
Uses of NamespacedKey in org.bukkit.inventory.meta.tags
Modifier and TypeMethodDescription<T,
Z> Z CustomItemTagContainer.getCustomTag
(NamespacedKey key, ItemTagType<T, Z> type) Deprecated.Returns the custom tag's value that is stored on the item.<T,
Z> boolean CustomItemTagContainer.hasCustomTag
(NamespacedKey key, ItemTagType<T, Z> type) Deprecated.Returns if the item meta has a custom tag registered matching the provided parameters.void
CustomItemTagContainer.removeCustomTag
(NamespacedKey key) Deprecated.Removes a custom key from the item meta.<T,
Z> void CustomItemTagContainer.setCustomTag
(NamespacedKey key, ItemTagType<T, Z> type, Z value) Deprecated.Stores a custom value on theItemMeta
. -
Uses of NamespacedKey in org.bukkit.loot
-
Uses of NamespacedKey in org.bukkit.packs
Modifier and TypeMethodDescriptionDataPackManager.getDataPack
(NamespacedKey dataPackKey) Gets aDataPack
by its key. -
Uses of NamespacedKey in org.bukkit.persistence
Modifier and TypeMethodDescriptionPersistentDataContainer.getKeys()
Get the set of keys present on thisPersistentDataContainer
instance.Modifier and TypeMethodDescription<P,
C> C PersistentDataContainer.get
(NamespacedKey key, PersistentDataType<P, C> type) Returns the metadata value that is stored on thePersistentDataHolder
instance.<P,
C> C PersistentDataContainer.getOrDefault
(NamespacedKey key, PersistentDataType<P, C> type, C defaultValue) Returns the metadata value that is stored on thePersistentDataHolder
instance.boolean
PersistentDataContainer.has
(NamespacedKey key) Returns if the persistent metadata provider has metadata registered matching the provided parameters.<P,
C> boolean PersistentDataContainer.has
(NamespacedKey key, PersistentDataType<P, C> type) Returns if the persistent metadata provider has metadata registered matching the provided parameters.void
PersistentDataContainer.remove
(NamespacedKey key) Removes a custom key from thePersistentDataHolder
instance.<P,
C> void PersistentDataContainer.set
(NamespacedKey key, PersistentDataType<P, C> type, C value) Stores a metadata value on thePersistentDataHolder
instance. -
Uses of NamespacedKey in org.bukkit.potion
Modifier and TypeMethodDescriptionstatic PotionEffectType
PotionEffectType.getByKey
(NamespacedKey key) Deprecated.only for backwards compatibility, useRegistry.get(NamespacedKey)
instead. -
Uses of NamespacedKey in org.bukkit.structure
Modifier and TypeMethodDescriptionStructureManager.getStructures()
Gets the currently registered structures.Modifier and TypeMethodDescriptionvoid
StructureManager.deleteStructure
(NamespacedKey structureKey) Unregisters the specified structure and deletes itsstructure file
from the primary world folder.void
StructureManager.deleteStructure
(NamespacedKey structureKey, boolean unregister) Deletes thestructure file
for the specified structure from the primary world folder.StructureManager.getStructure
(NamespacedKey structureKey) Gets a registered Structure.StructureManager.getStructureFile
(NamespacedKey structureKey) Gets the location where a structure file would exist in the primary world directory based on the NamespacedKey using the format world/generated/{NAMESPACE}/structures/{KEY}.nbt.StructureManager.loadStructure
(NamespacedKey structureKey) Loads the structure for the specified key and automatically registers it.StructureManager.loadStructure
(NamespacedKey structureKey, boolean register) Loads a structure for the specified key and optionallyregisters
it.StructureManager.registerStructure
(NamespacedKey structureKey, Structure structure) Registers the given structure.void
StructureManager.saveStructure
(NamespacedKey structureKey) Saves the currentlyregistered structure
for the specifiedkey
to the primary world folder as specified by {#getStructureFile(NamespacedKey}.void
StructureManager.saveStructure
(NamespacedKey structureKey, Structure structure) Saves a structure with a given key to the primary world folder.StructureManager.unregisterStructure
(NamespacedKey structureKey) Unregisters a structure.