Package org.bukkit
Interface UnsafeValues
Deprecated.
This interface provides value conversions that may be specific to a
 runtime, or have arbitrary meaning (read: magic values).
 
Their existence and behavior is not guaranteed across future versions. They may be poorly named, throw exceptions, have misleading parameters, or any other bad programming practice.
- 
Method SummaryModifier and TypeMethodDescriptionvoidDeprecated.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated.default EntitydeserializeEntity(byte[] data, World world) Deprecated.deserializeEntity(byte[] data, World world, boolean preserveUUID) Deprecated.deserializeItem(byte[] data) Deprecated.fromLegacy(Material material) Deprecated.fromLegacy(MaterialData material) Deprecated.fromLegacy(MaterialData material, boolean itemPriority) Deprecated.fromLegacy(Material material, byte data) Deprecated.getBiomeKey(RegionAccessor accessor, int x, int y, int z) Deprecated.Gets theNamespacedKeyfor the biome at the given location.getBlockTranslationKey(Material material) Deprecated.getCreativeCategory(Material material) Deprecated.intDeprecated.getDefaultAttributeModifiers(Material material, EquipmentSlot slot) Deprecated.getDefaultEntityAttributes(@NotNull NamespacedKey entityKey) Deprecated.Gets the default attributes for the entity represented by the namespaced key.Deprecated.Deprecated.Do not use, method will get removed, and the plugin won't rungetItemAttributes(@NotNull Material material, @NotNull EquipmentSlot equipmentSlot) Deprecated.Returns an immutable multimap of attributes for the material and slot.getItemRarity(Material material) Deprecated.Gets the item rarity of a material.getItemStackRarity(ItemStack itemStack) Deprecated.Gets the item rarity of the itemstack.getItemTranslationKey(Material material) Deprecated.Deprecated.Just don't use it.getMaterial(String material, int version) Deprecated.intDeprecated.Returns the server's protocol version.getStatisticCriteriaKey(Statistic statistic) Deprecated.Deprecated.Server name to report to timings v2getTranslationKey(EntityType entityType) Deprecated.getTranslationKey(ItemStack itemStack) Deprecated.default VersionFetcherDeprecated.Called once by the version command on first use, then cached.Deprecated, for removal: This API element is subject to removal in a future version.booleanhasDefaultEntityAttributes(@NotNull NamespacedKey entityKey) Deprecated.Checks if the entity represented by the namespaced key has default attributes.booleanisCollidable(@NotNull Material material) Deprecated.Checks if this material is collidable.static booleanisLegacyPlugin(Plugin plugin) Deprecated, for removal: This API element is subject to removal in a future version.booleanisSupportedApiVersion(String apiVersion) Deprecated, for removal: This API element is subject to removal in a future version.booleanisValidRepairItemStack(@NotNull ItemStack itemToBeRepaired, @NotNull ItemStack repairMaterial) Deprecated.Checks if an itemstack can be repaired with another itemstack.Deprecated, for removal: This API element is subject to removal in a future version.loadAdvancement(NamespacedKey key, String advancement) Deprecated.Load an advancement represented by the specified string into the server.modifyItemStack(ItemStack stack, String arguments) Deprecated.intDeprecated.Creates and returns the next EntityId available.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.byte[]processClass(PluginDescriptionFile pdf, String path, byte[] clazz) Deprecated.booleanDeprecated.Delete an advancement which was loaded and saved byloadAdvancement(org.bukkit.NamespacedKey, java.lang.String).voidDeprecated.resolveWithContext(Component component, CommandSender context, Entity scoreboardSubject, boolean bypassPermissions) Deprecated.byte[]serializeEntity(Entity entity) Deprecated.byte[]serializeItem(ItemStack item) Deprecated.voidsetBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey) Deprecated.Sets the biome at the given location to a biome registered to the givenNamespacedKey.Deprecated.
- 
Method Details- 
componentFlattenerComponentFlattener componentFlattener()Deprecated.
- 
plainComponentSerializerDeprecated, for removal: This API element is subject to removal in a future version.
- 
plainTextSerializerDeprecated, for removal: This API element is subject to removal in a future version.
- 
gsonComponentSerializerDeprecated, for removal: This API element is subject to removal in a future version.
- 
colorDownsamplingGsonComponentSerializerDeprecated, for removal: This API element is subject to removal in a future version.
- 
legacyComponentSerializerDeprecated, for removal: This API element is subject to removal in a future version.
- 
resolveWithContextComponent resolveWithContext(Component component, CommandSender context, Entity scoreboardSubject, boolean bypassPermissions) throws IOException Deprecated.- Throws:
- IOException
 
- 
reportTimingsvoid reportTimings()Deprecated.
- 
toLegacyDeprecated.
- 
fromLegacyDeprecated.
- 
fromLegacyDeprecated.
- 
fromLegacyDeprecated.
- 
fromLegacyDeprecated.
- 
getMaterialDeprecated.
- 
getDataVersionint getDataVersion()Deprecated.
- 
modifyItemStackDeprecated.
- 
checkSupportedDeprecated.- Throws:
- InvalidPluginException
 
- 
processClassDeprecated.
- 
loadAdvancementDeprecated.Load an advancement represented by the specified string into the server. The advancement format is governed by Minecraft and has no specified layout.
 It is currently a JSON object, as described by the Minecraft wiki.
 Loaded advancements will be stored and persisted across server restarts and reloads.
 Callers should be prepared forExceptionto be thrown.- Parameters:
- key- the unique advancement key
- advancement- representation of the advancement
- Returns:
- the loaded advancement or null if an error occurred
 
- 
removeAdvancementDeprecated.Delete an advancement which was loaded and saved byloadAdvancement(org.bukkit.NamespacedKey, java.lang.String).
 This method will only remove advancement from persistent storage. It should be accompanied by a call toServer.reloadData()in order to fully remove it from the running instance.- Parameters:
- key- the unique advancement key
- Returns:
- true if a file matching this key was found and deleted
 
- 
getDefaultAttributeModifiersMultimap<Attribute,AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot) Deprecated.
- 
getCreativeCategoryDeprecated.
- 
getBlockTranslationKeyDeprecated.
- 
getItemTranslationKeyDeprecated.
- 
getTranslationKeyDeprecated.
- 
getTranslationKeyDeprecated.
- 
getFeatureFlagDeprecated.
- 
getInternalPotionDataDeprecated.Do not use, method will get removed, and the plugin won't run- Parameters:
- key- of the potion type
- Returns:
- an internal potion data
 
- 
isSupportedApiVersionDeprecated, for removal: This API element is subject to removal in a future version.
- 
isLegacyPluginDeprecated, for removal: This API element is subject to removal in a future version.
- 
getTimingsServerNameString getTimingsServerName()Deprecated.Server name to report to timings v2- Returns:
- name
 
- 
getVersionFetcherDeprecated.Called once by the version command on first use, then cached.
- 
serializeItemDeprecated.
- 
deserializeItemDeprecated.
- 
serializeEntityDeprecated.
- 
deserializeEntityDeprecated.
- 
deserializeEntityDeprecated.
- 
nextEntityIdint nextEntityId()Deprecated.Creates and returns the next EntityId available.Use this when sending custom packets, so that there are no collisions on the client or server. 
- 
getMainLevelNameDeprecated.Just don't use it.
- 
getItemRarityDeprecated.Gets the item rarity of a material. The material MUST be an item. UseMaterial.isItem()before this.- Parameters:
- material- the material to get the rarity of
- Returns:
- the item rarity
 
- 
getItemStackRarityDeprecated.Gets the item rarity of the itemstack. The rarity can change based on enchantements.- Parameters:
- itemStack- the itemstack to get the rarity of
- Returns:
- the itemstack rarity
 
- 
isValidRepairItemStackboolean isValidRepairItemStack(@NotNull @NotNull ItemStack itemToBeRepaired, @NotNull @NotNull ItemStack repairMaterial) Deprecated.Checks if an itemstack can be repaired with another itemstack. Returns false if either argument's type is not an item (Material.isItem()).- Parameters:
- itemToBeRepaired- the itemstack to be repaired
- repairMaterial- the repair material
- Returns:
- true if valid repair, false if not
 
- 
getItemAttributes@NotNull @NotNull Multimap<Attribute,AttributeModifier> getItemAttributes(@NotNull @NotNull Material material, @NotNull @NotNull EquipmentSlot equipmentSlot) Deprecated.Returns an immutable multimap of attributes for the material and slot.Material.isItem()must be true for this material.- Parameters:
- material- the material
- equipmentSlot- the slot to get the attributes for
- Returns:
- an immutable multimap of attributes
- Throws:
- IllegalArgumentException- if- Material.isItem()is false
 
- 
getProtocolVersionint getProtocolVersion()Deprecated.Returns the server's protocol version.- Returns:
- the server's protocol version
 
- 
hasDefaultEntityAttributesDeprecated.Checks if the entity represented by the namespaced key has default attributes.- Parameters:
- entityKey- the entity's key
- Returns:
- true if it has default attributes
 
- 
getDefaultEntityAttributesDeprecated.Gets the default attributes for the entity represented by the namespaced key.- Parameters:
- entityKey- the entity's key
- Returns:
- an unmodifiable instance of Attributable for reading default attributes.
- Throws:
- IllegalArgumentException- if the entity does not exist of have default attributes (use- hasDefaultEntityAttributes(NamespacedKey)first)
 
- 
isCollidableDeprecated.Checks if this material is collidable.- Parameters:
- material- the material to check
- Returns:
- true if collidable
- Throws:
- IllegalArgumentException- if- Material.isBlock()is false
 
- 
getBiomeKeyDeprecated.Gets theNamespacedKeyfor the biome at the given location.- Parameters:
- accessor- The- RegionAccessorof the provided coordinates
- x- X-coordinate of the block
- y- Y-coordinate of the block
- z- Z-coordinate of the block
- Returns:
- the biome's NamespacedKey
 
- 
setBiomeKeyDeprecated.Sets the biome at the given location to a biome registered to the givenNamespacedKey. If no biome by the givenNamespacedKeyexists, anIllegalStateExceptionwill be thrown.- Parameters:
- accessor- The- RegionAccessorof the provided coordinates
- x- X-coordinate of the block
- y- Y-coordinate of the block
- z- Z-coordinate of the block
- biomeKey- Biome key
- Throws:
- IllegalStateException- if no biome by the given key is registered.
 
- 
getStatisticCriteriaKeyDeprecated.
 
-