Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionTimings will likely be replaced with Spark in the futureTimings will likely be replaced with Spark in the futureTimings will likely be replaced with Spark in the futureuse
SoundGroupuseRayTraceResultremoved in 1.16removed in 1.16useRayTraceResultuseTNTPrimeEventBukkit has addedEntityTransformEvent, you should start using thatUsePlayerSpawnLocationEvent, Duplicate APIReplaced byPlayerLocaleChangeEventupstreamUpstream has added their own API for using the game heightmaps. SeeHeightMapand the non-deprecated getHighestBlock methods on World such asWorld.getHighestBlockAt(org.bukkit.Location, org.bukkit.HeightMap).Draft APIchat preview was removed in 1.19.3no longer used, seeStructuresLocateEventwill be removed in adventure 5.0.0, usePlainTextComponentSerializer.plainText()useStructureThe new multi-stage worldgen API allows a similar effect by overriding all of the "shouldGenerate..." methods to return true, and then modifying the chunkdata in a later stage such as surface or bedrock generation.should not be used for anything, useThrownPotionand set the potion via the methods there.Hopper minecarts don't have cooldowns anymoreHopper minecarts don't have cooldowns anymoreDoes not do anythingDoes not do anythingshould not be used for anything, useThrownPotionand set the potion via the methods there.Duplicate api, useWither.getInvulnerableTicks()Duplicate api, useWither.setInvulnerableTicks(int)the respawn point is now set when the player enter the bed and this option doesn't work since MC 1.15.the respawn point is now set when the player enter the bed and this option doesn't work since MC 1.15.dismounting on tp is no longer controlled by the serverdifferent types are different itemsdifferent types are different itemsuseDatapackuseDatapackManagerPlugin loading now occurs at a point which makes it impossible to expose this behavior. This instance will only throw unsupported operation exceptions.this method's behavior is broken and not useful. If you want to get an object based on its vanilla name, or a key, wrap it in aNamespacedKeyobject and useRegistry.get(NamespacedKey)The new multi-stage worldgen API allows a similar effect by overriding all of the "shouldGenerate..." methods to return true, and then modifying the chunkdata in a later stage such as surface or bedrock generation.useTranslatablelook for atranslationKey()method insteadunused as of 1.19Upstream has added support for this, useWorld.getHighestBlockAt(int, int, HeightMap)Upstream has added support for this, useWorld.getHighestBlockAt(Location, HeightMap)Upstream has added support for this, useRegionAccessor.getHighestBlockYAt(int, int, HeightMap)Upstream has added support for this, useRegionAccessor.getHighestBlockYAt(Location, HeightMap)useWorldBorder.isInside(Location)for an upstream compatible replacement
-
Deprecated InterfacesInterfaceDescriptionTimings will likely be replaced with Spark in the futureuse
SoundGroupshould not be used for anything, useThrownPotionand set the potion via the methods there.should not be used for anything, useThrownPotionand set the potion via the methods there.tipped status depends only on base potion type not being UNCRAFTABLE and effects being empty.Biomes are now set withBiomeProviderthis API part has been replaced by thePersistentDataHolderAPI. Please usePersistentDataHolderinstead of this.this API part has been replaced byPersistentDataHolder. Please usePersistentDataAdapterContextinstead of this.please usePersistentDataTypeas this part of the api is being replaceduseDatapackuseDatapackManagerseePlayerProfileuseTranslatableUse either the Future or the Consumer based methods
-
Deprecated ClassesClassDescriptionTimings will likely be replaced with Spark in the futureTimings will likely be replaced with Spark in the futureuse
RayTraceResultuseRayTraceResultuseTNTPrimeEventBukkit has addedEntityTransformEvent, you should start using thatDeprecated, useProjectileHitEventand check if there is a hit entityNot usedUsePlayerSpawnLocationEvent, Duplicate APIReplaced byPlayerLocaleChangeEventupstreamDraft APIuseTitleuseBellRingEventListening to this event forces chat to wait for the main thread, delaying chat messages. It is recommended to useAsyncChatEventinstead, wherever possible.no longer used, seeStructuresLocateEventuseStructureUnsupported apiuseAsyncChatEventinsteadchat previews have been removedUse the more genericPlayerBucketEntityEventThis event will fire from the main thread and allows the use of all of the Bukkit API, unlike theAsyncPlayerChatEvent.Listening to this event forces chat to wait for the main thread which causes delays for chat.
AsyncPlayerChatEventis the encouraged alternative for thread safe implementations.This event is no longer fired due to client changesThis event causes synchronization from the login thread;AsyncPlayerPreLoginEventis preferred to keep the secondary threads asynchronous.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.useSpawnEggMetaall usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.all usage of MaterialData is deprecated and subject to removal. UseBlockData.use the constants declared inCriteriainsteadThis class does not represent the structures of a world well. UseStructureorStructureTypeinstead.Unsupported api
-
Deprecated Enum ClassesEnum ClassDescriptionUpstream has added their own API for using the game heightmaps. See
HeightMapand the non-deprecated getHighestBlock methods on World such asWorld.getHighestBlockAt(org.bukkit.Location, org.bukkit.HeightMap).ChatColor has been deprecated in favor of Adventure API. SeeNamedTextColorfor the adventure equivalent of pre-defined text colorsnot representative of what Effect doesfuture versions of Minecraft have additional spell casting entities.different variants are differing classesCats are now a separate entity.classes are different types. This interface only remains in the Skeleton interface to preserve backwards compatibility.This API is responsible for a large number of implementation problems and is in general unsustainable to maintain. It is likely to be removed very soon in a subsequent release. Please see https://www.spigotmc.org/threads/194446/ for more information.useBlockDatause BlockDatauseBlockDatareplaced byTeam.OptionStatuscheckMaterialinsteadDeprecated, see usage methods for replacement(s)
-
Deprecated Annotation InterfacesAnnotation InterfaceDescriptionThis should generally not be used in any new API code as it suggests a bad API design.
-
Deprecated FieldsFieldDescriptionremoved in 1.16removed in 1.16unused, not intended to be APIunused, not intended to be APIMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic value
-
Deprecated MethodsMethodDescriptionDoesn't do anything - Removedshould never be used by plugins, for internal use only!!check if
WaterBottleSplashEvent.getToDamage()contains an entityuseWaterBottleSplashEvent.damageAsWaterSensitive(LivingEntity)orWaterBottleSplashEvent.doNotDamageAsWaterSensitive(LivingEntity)to change which entities are damagedchat preview was removed in 1.19.3will be removed in adventure 5.0.0, usePlainTextComponentSerializer.plainText()Magic valueMagic valueThis return a generic class, prefer useBanList.getEntries()only encodes y block ranges from -512 to 511 and represents an already changed implementation detailMagic valueMagic valueMagic valuein favour ofCommandBlock.name()magic value, useCreatureSpawner.getSpawnedType().magic value, useCreatureSpawner.setSpawnedType(org.bukkit.entity.EntityType).in favor ofDecoratedPot.getSherds()Magic valueMagic valueA sign may have multiple writable sides now. UseSign.getSide(Side)andColorable.getColor().A sign may have multiple writable sides now. UseSign.getSide(Side)andSignSide.line(int).A sign may have multiple writable sides now. UseSign.getSide(Side)andSignSide.lines().useSign.isWaxed()insteadA sign may have multiple writable sides now. UseSign.getSide(Side)andSignSide.isGlowingText().A sign may have multiple writable sides now. UseSign.getSide(Side)andSignSide.line(int).A sign may have multiple writable sides now. UseSign.getSide(Side)andSignSide.line(int, net.kyori.adventure.text.Component).A sign may have multiple writable sides now. UseSign.getSide(Side)andSignSide.lines().A sign may have multiple writable sides now. UseSign.getSide(Side)andColorable.setColor(org.bukkit.DyeColor).useSign.setWaxed(boolean)insteadA sign may have multiple writable sides now. UseSign.getSide(Side)andSignSide.setGlowingText(boolean).A sign may have multiple writable sides now. UseSign.getSide(Side)andSignSide.line(int, net.kyori.adventure.text.Component).in favour ofSignSide.line(int)in favour ofSignSide.lines()useBlockDatacheckMaterialinsteaduseBlockDatacheckMaterialinsteadin favour ofServer.broadcast(net.kyori.adventure.text.Component)The new multi-stage worldgen API allows a similar effect by overriding all of the "shouldGenerate..." methods to return true, and then modifying the chunkdata in a later stage such as surface or bedrock generation.Deprecated in favor ofBukkit.getSpawnLimit(SpawnCategory)Deprecated in favor ofBukkit.getSpawnLimit(SpawnCategory)Deprecated in favor ofBukkit.getSpawnLimit(SpawnCategory)in favour ofBukkit.motd()in favour ofBukkit.shutdownMessage()Deprecated in favor ofBukkit.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofBukkit.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofBukkit.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofBukkit.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofBukkit.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofBukkit.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofBukkit.getSpawnLimit(SpawnCategory)Deprecated in favor ofBukkit.getSpawnLimit(SpawnCategory)Deprecated in favor ofBukkit.getSpawnLimit(SpawnCategory)in favour ofBukkit.motd(net.kyori.adventure.text.Component)chat previews have been removedbiomes are now 3-dimensionalMagic valuebiomes are now 3-dimensionalMagic valueMagic valuesender UUID is ignoredsender UUID is ignoredusesendMessagemethods that acceptComponentusesendMessagemethods that acceptComponentusesendMessagemethods that acceptComponentusesendMessagemethods that acceptComponentThis method only exists for backwards compatibility. It will do nothing and should not be used! Please useFileConfigurationOptions.getHeader()instead.CallFileConfigurationOptions.parseComments()instead.CallFileConfigurationOptions.parseComments(boolean)instead.use getHeader() instead.use setHeader() insteadsender UUID is ignoredMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valuelegacy use onlyMagic valueMagic valuesome effects can be both or neitherenchantments are badly named, useEnchantment.getByKey(org.bukkit.NamespacedKey).enchantments are badly named, useEnchantment.getKey().UseAbstractArrow.getPickupStatus()as an upstream compatible replacement for this functionUseAbstractArrow.setPickupStatus(PickupStatus)withAbstractArrow.PickupStatusas an upstream compatible replacement for this functiondifferent variants are different classesuseAbstractHorse.isEatingGrass(), this name is incorrectuseAbstractHorse.setEatingGrass(boolean), this name is incorrectyou are required to spawn a different entityshould check what class instance this is.Must spawn a new subtype variantpreferEntityEquipment.getBoots()preferEntityEquipment.getHelmet()preferArmorStand.getItem(EquipmentSlot)// PaperpreferArmorStand.setItem(EquipmentSlot, ItemStack)// Paperboats are complex and many of these methods do not work correctly across multiple versions.boats are complex and many of these methods do not work correctly across multiple versions.boats are complex and many of these methods do not work correctly across multiple versions.deprecated in favor ofBoat.getBoatType()boats are complex and many of these methods do not work correctly across multiple versions.boats are complex and many of these methods do not work correctly across multiple versions.boats are complex and many of these methods do not work correctly across multiple versions.boats are complex and many of these methods do not work correctly across multiple versions.deprecated in favor ofBoat.setBoatType(Type)boats are complex and many of these methods do not work correctly across multiple versions.this functionality no longer existsthis functionality no longer existsentities may have multiple passengers, useEntity.getPassengers()entities may have multiple passengers, useEntity.addPassenger(org.bukkit.entity.Entity)Magic valueMagic valueMagic valueMagic valuefuture versions of Minecraft have additional spell casting entities.future versions of Minecraft have additional spell casting entities.Use getSpawnReason() == EXP_BOTTLEreplaced byEntity.getOrigin()has no effect in newer Minecraft versionshas no effect in newer Minecraft versionsshould check if instance ofElderGuardian.Must spawn a newElderGuardian.seeChestedHorseseeChestedHorseHumans may now dual wield in their off hand, use explicit methods inPlayerInventory.Deprecated in favor ofLivingEntity.getActiveItem()There are currently no well defined semantics regarding serialized entities in Bukkit. Use with care.There are currently no well defined semantics regarding serialized entities in Bukkit. Use with care.Humans may now dual wield in their off hand, use explicit methods inPlayerInventory.There are currently no well defined semantics regarding serialized entities in Bukkit. Use with care.There are currently no well defined semantics regarding serialized entities in Bukkit. Use with care.Unsupported apiThe lightning strike sound has been moved into the client and this can't predict if the sound will be played or not accurately.no need to force since multiple effects of the same type are now supported.useLivingEntity.setArrowsInBody(int, boolean). This method previously firedArrowBodyCountChangeEventso if you want to retain exact functionality, passtrueforfireEvent.This does nothing and is immediately reverted by the server, in the next tickHopper minecarts don't have cooldowns anymoreHopper minecarts don't have cooldowns anymoreCats are now a separate entity.Cats are now a separate entity.Magic valueMagic valueseeAgeable.setBaby()andAgeable.setAdult()in favour ofPlayer.displayName()in favour ofPlayer.locale()in favour ofPlayer.playerListFooter()in favour ofPlayer.playerListHeader()in favour ofPlayer.playerListName()This is no longer sent from the client and will always be nullThis value is controlled only by the client and is therefore unreliable and vulnerable to spoofing and/or desync depending on the context/time which it is accessedin favour ofPlayer.kick(net.kyori.adventure.text.Component)Magic valueMagic valueMagic valuesuppressLightUpdates is not functional in versions greater than 1.19.4usesendMessagemethods that acceptComponentusesendMessagemethods that acceptComponentThis is unlikely the API you want to use. SeePlayer.sendActionBar(String)for a more proper Action Bar API. This deprecated API may send unsafe items to the client.suppressLightUpdates is no longer available in 1.20+, usePlayer.sendMultiBlockChange(Map)UsePlayer.sendBlockUpdate(Location, TileState)by creating a new virtualSignblock state viaBlockData.createBlockState()(constructed e.g. viaMaterial.createBlockData())UsePlayer.sendBlockUpdate(Location, TileState)by creating a new virtualSignblock state viaBlockData.createBlockState()(constructed e.g. viaMaterial.createBlockData())UsePlayer.sendBlockUpdate(Location, TileState)by creating a new virtualSignblock state viaBlockData.createBlockState()(constructed e.g. viaMaterial.createBlockData())UsePlayer.sendBlockUpdate(Location, TileState)by creating a new virtualSignblock state viaBlockData.createBlockState()(constructed e.g. viaMaterial.createBlockData())UsePlayer.sendBlockUpdate(Location, TileState)by creating a new virtualSignblock state viaBlockData.createBlockState()(constructed e.g. viaMaterial.createBlockData())UsePlayer.sendBlockUpdate(Location, TileState)by creating a new virtualSignblock state viaBlockData.createBlockState()(constructed e.g. viaMaterial.createBlockData())UsePlayer.sendBlockUpdate(Location, TileState)by creating a new virtualSignblock state viaBlockData.createBlockState()(constructed e.g. viaMaterial.createBlockData())Minecraft no longer uses textures packs. Instead you should usePlayer.setResourcePack(String).usesendMessagemethods that acceptComponentusesendMessagemethods that acceptComponentusesendMessagemethods that acceptComponentusesendMessagemethods that acceptComponentDoes not do anythingDoes not do anythingAPI subject to changein favour ofTextDisplay.text()API subject to changein favour ofTextDisplay.text(net.kyori.adventure.text.Component)replaced byEntity.getOrigin()This API duplicates existing API which uses the more preferable name due to mirroring internals betterThis API duplicates existing API which uses the more preferable name due to mirroring internals betterThis API duplicates existing API which uses the more preferable name due to mirroring internals betterDuplicate api, useWither.getInvulnerableTicks()Duplicate api, useWither.setInvulnerableTicks(int)seeAgeable.setBaby()andAgeable.setAdult()check if instanceofZombieVillager.seeAgeable.setBaby()andAgeable.setAdult()must spawnZombieVillager.Magic valueslime blocks make the value of this method inaccurate due to blocks being pushed at the sidenot all cauldron contents are Levellednot all cauldron contents are Levellednot all cauldron contents are Levelledin favour ofSignChangeEvent.line(int)in favour ofSignChangeEvent.lines()UsePrepareItemEnchantEvent.getOffers()instead of this methodThis does nothing, the server and the client doesn't work correctly when the server try to bypass this. A current workaround exists. If you want to cancel the switch from the ground state to the swimming state you need to disable the sprinting flag for the player after the cancel action.horse jumping was moved client side.horse jumping was moved client side.in favour ofPlayerDeathEvent.deathMessage()MC 1.14 has changed how villagers restock their trades. UseMerchantRecipe.getUses().MC 1.14 has changed how villagers restock their trades. This has no effect anymore.This changes the ItemStack in their hand before any calculations are applied to the Inventory, which has a tendency to create inconsistencies between the Player and the server, and to make unexpected changes in the behavior of the clicked Inventory.This method uses a deprecated enum fromPlayerPreLoginEventThis method uses a deprecated enum fromPlayerPreLoginEventin favour ofAsyncPlayerPreLoginEvent.kickMessage()This method uses a deprecated enum fromPlayerPreLoginEventThis method uses a deprecated enum fromPlayerPreLoginEventthe respawn point is now set when the player enter the bed and this option doesn't work since MC 1.15.the respawn point is now set when the player enter the bed and this option doesn't work since MC 1.15.This method is provided for backward compatibility with no guarantee to the effect of viewing or modifying the set.books may be signed from off handmisleading, usePlayerInteractEvent.getInteractionPoint()This event has two possible cancellation states, one forPlayerInteractEvent.useInteractedBlock()and one forPlayerInteractEvent.useItemInHand(). It is possible a call might have the former false, but the latter true, eg in the case of using a firework whilst gliding. Callers should check the relevant methods individually.in favour ofPlayerJoinEvent.joinMessage()in favour ofPlayerKickEvent.leaveMessage()in favour ofPlayerKickEvent.reason()in favour ofPlayerLocaleChangeEvent.locale()in favour ofPlayerLoginEvent.kickMessage()No effectNo effectin favour ofPlayerPreLoginEvent.kickMessage()in favour ofPlayerQuitEvent.quitMessage()dismounting on tp is no longer controlled by the serverin favour ofBroadcastMessageEvent.message()in favour ofServerListPingEvent.motd()chat previews have been removedUseRegistry.get(NamespacedKey)instead.useIterable.iterator().Magic valueMagic valuebiomes are now 3-dimensionalbiomes are now 3-dimensionalUses magic valuesChunkGenerator.ChunkDataare now directly providedThe generation is now split up and the new methods should be used, seeChunkGeneratorthe chunk generation code should be thread safehas no effect, bedrock generation is part of the surface step, seeChunkGenerator.shouldGenerateSurface()Magic valueMagic valueUseCookingRecipe.getInputChoice()instead for more complete data.entities can duel wield now use the methods for the specific hand insteadentities can duel wield now use the methods for the specific hand insteadentities can duel wield now use the methods for the specific hand insteadentities can duel wield now use the methods for the specific hand insteadMagic valuein favour ofInventoryView.title()Magic valueItemStackimplementsTranslatable; use that andComponent.translatable(net.kyori.adventure.translation.Translatable)instead.for internal use onlycast toBlockDataMetaand useBlockDataMeta.getBlockData(Material)ItemStackimplementsTranslatable; use that andComponent.translatable(net.kyori.adventure.translation.Translatable)instead.in favor ofItemStack.lore()durability is now part of ItemMeta. To avoid confusion and misuse,ItemStack.getItemMeta(),ItemStack.setItemMeta(ItemMeta)andDamageable.setDamage(int)should be used instead. This is because any call to this method will be overwritten by subsequent setting of ItemMeta which was created before this call.in favour ofItemStack.lore(List)banner color is now stored as the data value, not meta.banner color is now stored as the data value, not meta.in favour ofBookMeta.page(int)in favour ofBook.pages()in favour ofBook.pages(net.kyori.adventure.text.Component...)in favour ofBook.pages(List)in favour ofBookMeta.page(int)in favour ofBook.pages()in favour ofBook.pages(java.util.List)in favour ofBook.pages(net.kyori.adventure.text.Component...)Minecraft does not limit this to the material enum, UseItemMeta.getDestroyableKeys()as a replacementMinecraft does not limit this to the material enum, UseItemMeta.getPlaceableKeys()as a replacementthis API part has been replaced by thePersistentDataHolderAPI. Please usePersistentDataHolder.getPersistentDataContainer()instead of this.in favour ofItemMeta.displayName()UseItemMeta.displayName()and cast it to aTranslatableComponent. No longer used by the client.in favour ofItemMeta.lore()useItemMeta.lore()UseItemMeta.displayName()and check if it is instanceof aTranslatableComponent.Minecraft does not limit this to the material enum, UseItemMeta.setDestroyableKeys(Collection)as a replacementMinecraft does not limit this to the material enum, UseItemMeta.setPlaceableKeys(Collection)as a replacementUseItemMeta.displayName(Component)with aTranslatableComponent. No longer used by the client.in favour ofItemMeta.lore(List)internal use onlyThis method does not have the expected effect and is actually an alias forItemMeta.getLocalizedName().This method does not have the expected effect and is actually an alias forItemMeta.hasLocalizedName().This method does not have the expected effect and is actually an alias forItemMeta.setLocalizedName(String).These methods are poor API: They rely on the caller to pass in an only an integer property, and have poorly defined implementation behavior if that integer is not a valid map (the current implementation for example will generate a new map with a different ID). The xxxMapView family of methods should be used instead.different types are different itemsdifferent types are different itemsplayers can duel wield now use the methods for the specific hand insteadplayers can duel wield now use the methods for the specific hand insteadfor compatibility onlyUseShapedRecipe.getChoiceMap()instead for more complete data.Magic valueMagic valueMagic valueUseShapelessRecipe.getChoiceList()instead for more complete data.Magic valueMagic valueUseStonecuttingRecipe.getInputChoice()instead for more complete data.only encodes y block ranges from -512 to 511 and represents an already changed implementation detailMagic value, useMapCanvas.getBasePixelColor(int, int)Magic value, useMapCanvas.getPixelColor(int, int)Magic value, useMapCanvas.setPixelColor(int, int, Color)in favour ofMapCursor.caption()Magic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueThis method should not be used; use hinge and facing accessors instead.Magic valueMagic valueMagic valuecurrently does not have an implementation which is well linked to the underlying server. Contributions welcome.Magic valueMagic valuethis method creates an ItemStack of size 0 which is not generally useful. ConsiderMaterialData.toItemStack(int).Use MushroomBlockType cap optionsMagic valueThis is now stored inSpawnEggMeta.This is now stored inSpawnEggMeta.Magic valueMagic valueMagic valueMagic valueMagic valueMagic valueUseRegistry.get(NamespacedKey)instead.useIterable.iterator().in favour ofNameable.customName()should never be used by plugins, for internal use only!!Magic valueMagic valueMagic valueMagic valueMagic valueThe API contract is ambiguous and the implementation may or may not return the correct value given this API ambiguity. It is instead recommended useOfflinePlayer.getLastLogin()orOfflinePlayer.getLastSeen()depending on your needs.No longer applicable to all types of pluginsPlugin loading now occurs at a point which makes it impossible to expose this behavior. This instance will only throw unsupported operation exceptions.not an API methodnot an API methodMay be inaccurate due to different plugin implementations.unusedInternal useNon-functionalNon-functionalNon-Functionalcolor is not part of potion effectsMagic valueunused, always 1.0Magic valueMisleadingthis method's behavior is broken and not useful. If you want to get an object based on its vanilla name, or a key, wrap it in aNamespacedKeyobject and useRegistry.get(NamespacedKey)Magic valueMagic valueThis name is misleading, as it does not schedule "a sync" task, but rather, "an async" taskThis name is misleading, as it does not schedule "a sync" task, but rather, "an async" taskThis name is misleading, as it does not schedule "a sync" task, but rather, "an async" taskin favour ofObjective.displayName()Scoreboards can contain entries that aren't playersScoreboards can contain entries that aren't playersa displayName should be explicitly specifiedin favour ofTeam.color()in favour ofTeam.displayName()Teams can contain entries that aren't playersin favour ofTeam.prefix()in favour ofTeam.suffix()in favour ofTeam.displayName(net.kyori.adventure.text.Component)in favour ofTeam.prefix(net.kyori.adventure.text.Component)in favour ofTeam.suffix(net.kyori.adventure.text.Component)usesendMessagemethods that acceptComponentusesendMessagemethods that acceptComponentThe new multi-stage worldgen API allows a similar effect by overriding all of the "shouldGenerate..." methods to return true, and then modifying the chunkdata in a later stage such as surface or bedrock generation.Deprecated in favor ofServer.getSpawnLimit(SpawnCategory)Deprecated in favor ofServer.getSpawnLimit(SpawnCategory)Deprecated in favor ofServer.getSpawnLimit(SpawnCategory)in favour ofServer.motd()in favour ofServer.shutdownMessage()Deprecated in favor ofServer.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofServer.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofServer.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofServer.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofServer.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofServer.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofServer.getSpawnLimit(SpawnCategory)Deprecated in favor ofServer.getSpawnLimit(SpawnCategory)Deprecated in favor ofServer.getSpawnLimit(SpawnCategory)in favour ofServer.motd(net.kyori.adventure.text.Component)chat previews have been removedlook for atranslationKey()method insteadMagic valueMagic valueunused as of 1.19Magic valueMagic valuethis method does not handle tile entities (bee nests)Deprecated in favor ofWorld.getSpawnLimit(SpawnCategory)Deprecated in favor ofWorld.getSpawnLimit(SpawnCategory)biomes are now 3-dimensionalonly encodes y block ranges from -512 to 511 and represents an already changed implementation detailUse either the Future or the Consumer based methodsUse either the Future or the Consumer based methodsUse either the Future or the Consumer based methodsuseWorld.getGameRuleValue(GameRule)insteadUpstream has added support for this, useWorld.getHighestBlockAt(int, int, HeightMap)Upstream has added support for this, useWorld.getHighestBlockAt(Location, HeightMap)Upstream has added support for this, useRegionAccessor.getHighestBlockYAt(int, int, HeightMap)Upstream has added support for this, useRegionAccessor.getHighestBlockYAt(Location, HeightMap)biomes are now 3-dimensionalDeprecated in favor ofWorld.getSpawnLimit(SpawnCategory)biomes are now 3-dimensionalDeprecated in favor ofWorld.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofWorld.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofWorld.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofWorld.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofWorld.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofWorld.getTicksPerSpawns(SpawnCategory)Deprecated in favor ofWorld.getSpawnLimit(SpawnCategory)Deprecated in favor ofWorld.getSpawnLimit(SpawnCategory)Deprecated in favor ofWorld.getSpawnLimit(SpawnCategory)world type is only used to select the default word generation settings and is not stored in Vanilla worlds, making it impossible for this method to always return the correct value.This method was added to facilitate chunk garbage collection. As of the current Minecraft version chunks are now strictly managed and will not be loaded for more than 1 tick unless they are in use.regenerating a single chunk is not likely to produce the same chunk as before as terrain decoration may be spread across chunks. It may or may not change blocks in the adjacent chunks as well.Deprecated in favor ofWorld.setSpawnLimit(SpawnCategory, int)Deprecated in favor ofWorld.getSpawnLimit(SpawnCategory)biomes are now 3-dimensionaluseWorld.setGameRule(GameRule, Object)instead.Deprecated in favor ofWorld.setSpawnLimit(SpawnCategory, int)Deprecated in favor ofWorld.setTicksPerSpawns(SpawnCategory, int)Deprecated in favor ofWorld.setTicksPerSpawns(SpawnCategory, int)Deprecated in favor ofWorld.setTicksPerSpawns(SpawnCategory, int)Deprecated in favor ofWorld.setTicksPerSpawns(SpawnCategory, int)Deprecated in favor ofWorld.setTicksPerSpawns(SpawnCategory, int)Deprecated in favor ofWorld.setTicksPerSpawns(SpawnCategory, int)Deprecated in favor ofWorld.setSpawnLimit(SpawnCategory, int)Deprecated in favor ofWorld.setSpawnLimit(SpawnCategory, int)Deprecated in favor ofWorld.setSpawnLimit(SpawnCategory, int)Magic valueUnsupported apiThe lightning strike sound has been moved into the client and this doesn't prevent the sound being played. Use the regular (non spigot) methods instead for a consistent behavior.The lightning strike sound has been moved into the client and this doesn't prevent the sound being played. Use the regular (non spigot) methods instead for a consistent behavior.useWorldBorder.isInside(Location)for an upstream compatible replacement
-
Deprecated ConstructorsConstructorDescriptionUse NamespacedKey version of constructorUse NamespacedKey version of constructorUse NamespacedKey version of constructorshould never be used by plugins, for internal use only!!options requiredoptions requiredorg.bukkit.event.player.PlayerBucketEmptyEvent
(Player, Block, Block, BlockFace, Material, ItemStack) this method uses an ambiguous data byte objectRecipes must have keys. UseShapedRecipe(NamespacedKey, ItemStack)instead.as of Minecraft 1.20, smithing recipes are now separated into two distinct recipe types,SmithingTransformRecipeandSmithingTrimRecipe. This class now acts as a base class to these two classes and will do nothing when added to the server.Magic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueArtifact of old API, equivalent to newDoor(Material.LEGACY_WOODEN_DOOR);Magic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueMagic valueIn favour of usingPotion(PotionType)withPotion.splash().
-
Deprecated Enum ConstantsEnum ConstantDescriptiondeprecated in favor of
BanList.Type.PROFILEno longer existsno longer existsno longer existsno longer existsno longer existsno longer existsno longer existsno longer existsno longer existsno longer existsthis target no longer exists in Vanillaalthough this effect may trigger other events on non-living entities, it's only supported usage is on living ones.although this effect may trigger other events on non-living entities, it's only supported usage is on living ones.no longer called, chunks are generated with entities already existing. Consider usingChunkLoadEvent,ChunkLoadEvent.isNewChunk()andChunk.getEntities()for similar effect.misleading name and description, useItemFlag.HIDE_ITEM_SPECIFICSall plugins are now assumed to be UTF-8 aware.