From 881d616533b567528fa81bfb0441c008c84f28ec Mon Sep 17 00:00:00 2001 From: Bjarne Koll Date: Tue, 3 Dec 2024 15:47:48 +0100 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11702) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: ed0ec489 SPIGOT-7965: Unknown TransformReason for Hoglins 9db03457 SPIGOT-7964: Fix typo in Deprecation annotation d14119af PR-1082: Add "since" to Deprecation annotations e8a318d4 PR-1067: Add method to get Advancement requirements CraftBukkit Changes: 40dd796db SPIGOT-7971: NotSerializableException on serialize CraftUseCooldownComponent fa85c5e0a SPIGOT-7968: ProjectileHitEvent not trigerred when arrow hits entity b75b792ec SPIGOT-7970: World#getMaxHeight() returning incorrect value 2b9a094bb SPIGOT-7965: Unknown TransformReason for Hoglins fd3f5a380 SPIGOT-7966: Some trees do not generate with #generateTree f2822317c PR-1515: Add a Class reader and Class node argument provider 07abf6852 PR-1514: Add a test case for ClassTraverser a7577cb24 Fix Inventory#addItem not respecting max stack size 066a74e74 PR-1490: Add method to get Advancement requirements 4a1df30e4 PR-1512: Test Art class based on specific values instead of the implementation, to better catch implementation changes 53254c56f PR-1503: Simplify CAS loop to getAndSet e9447dc5e Make BlockDataMeta#setBlockData hide unspecified states dd08a7120 SPIGOT-7960: Fix inconsistency between natural item drop coordinates e9e8ed753 SPIGOT-7960: Improve natural item drop methods Spigot Changes: 60c9969b Rebuild patches --- ...-replace-OfflinePlayer-getLastPlayed.patch | 2 +- ...eEvent-and-CollarColorable-interface.patch | 2 +- patches/api/Add-FeatureFlag-API.patch | 30 +- patches/api/Add-WaterBottleSplashEvent.patch | 2 +- ...n-in-sunlight-API-for-Phantoms-and-S.patch | 2 +- patches/api/Add-critical-damage-API.patch | 4 +- patches/api/Add-drops-to-shear-events.patch | 2 +- ...ainThreadExecutor-to-BukkitScheduler.patch | 2 +- ...working-with-arrows-stuck-in-living-.patch | 6 +- .../Add-methods-to-get-translation-keys.patch | 4 +- patches/api/Add-more-Evoker-API.patch | 2 +- patches/api/Add-more-advancement-API.patch | 2 +- ...dd-more-fields-to-AsyncPreLoginEvent.patch | 2 +- .../Add-openSign-method-to-HumanEntity.patch | 2 +- .../Add-setPlayerProfile-API-for-Skulls.patch | 2 +- patches/api/Adventure.patch | 46 +- patches/api/Custom-Potion-Mixes.patch | 8 +- .../Disable-deprecated-annotation-test.patch | 26 ++ ...lay-warning-on-deprecated-recipe-API.patch | 4 +- patches/api/Expand-ArmorStand-API.patch | 4 +- patches/api/Expand-FallingBlock-API.patch | 2 +- patches/api/Expand-LingeringPotion-API.patch | 2 +- patches/api/Expand-PlayerItemMendEvent.patch | 2 +- .../api/Experimental-annotations-change.patch | 4 +- ...xpose-hand-during-BlockCanBuildEvent.patch | 2 +- patches/api/Fix-BanList-API.patch | 4 +- patches/api/Fix-NotePlayEvent.patch | 4 +- .../Fix-SpawnEggMeta-get-setSpawnedType.patch | 8 +- .../api/Fix-Spigot-annotation-mistakes.patch | 402 +++++++++--------- .../Fix-equipment-slot-and-group-API.patch | 2 +- patches/api/Fix-upstream-javadocs.patch | 10 +- patches/api/Implement-regenerateChunk.patch | 2 +- patches/api/Improve-scoreboard-entries.patch | 28 +- patches/api/Missing-Entity-API.patch | 2 +- patches/api/More-Enchantment-API.patch | 2 +- patches/api/More-Projectile-API.patch | 2 +- ...t-data-components-copy-in-smithing-r.patch | 2 +- patches/api/Paper-Plugins.patch | 2 +- .../Proxy-ItemStack-to-CraftItemStack.patch | 4 +- ...d-RespawnFlags-to-PlayerRespawnEvent.patch | 2 +- patches/api/fix-Instruments.patch | 4 +- ...rtant-BlockStateListPopulator-method.patch | 4 +- patches/server/Add-more-advancement-API.patch | 2 +- patches/server/CB-fixes.patch | 28 ++ ...l-ProjectileHitEvent-for-entity-hits.patch | 22 - .../Fix-issues-with-mob-conversion.patch | 8 +- .../Improved-Async-Task-Scheduler.patch | 5 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 50 files changed, 374 insertions(+), 347 deletions(-) create mode 100644 patches/api/Disable-deprecated-annotation-test.patch delete mode 100644 patches/server/Call-ProjectileHitEvent-for-entity-hits.patch diff --git a/patches/api/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/patches/api/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index d9ae817577..77ef20b948 100644 --- a/patches/api/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/patches/api/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -31,7 +31,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** @@ -0,0 +0,0 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio @Nullable - @Deprecated + @Deprecated(since = "1.20.4") public Location getBedSpawnLocation(); + // Paper start + /** diff --git a/patches/api/Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/api/Add-EntityDyeEvent-and-CollarColorable-interface.patch index 9afb9edb7e..5317e72e24 100644 --- a/patches/api/Add-EntityDyeEvent-and-CollarColorable-interface.patch +++ b/patches/api/Add-EntityDyeEvent-and-CollarColorable-interface.patch @@ -198,7 +198,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +public class SheepDyeWoolEvent extends io.papermc.paper.event.entity.EntityDyeEvent implements Cancellable { + // Paper - move everything to superclass - @Deprecated + @Deprecated(since = "1.17.1") public SheepDyeWoolEvent(@NotNull final Sheep sheep, @NotNull final DyeColor color) { @@ -0,0 +0,0 @@ public class SheepDyeWoolEvent extends EntityEvent implements Cancellable { } diff --git a/patches/api/Add-FeatureFlag-API.patch b/patches/api/Add-FeatureFlag-API.patch index cb94bed504..279ff82a8e 100644 --- a/patches/api/Add-FeatureFlag-API.patch +++ b/patches/api/Add-FeatureFlag-API.patch @@ -141,34 +141,32 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public interface FeatureFlag extends Keyed { * @deprecated not available since 1.21.2 */ - @Deprecated + @Deprecated(since = "1.21.2") - public static final FeatureFlag BUNDLE = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("bundle")); + FeatureFlag BUNDLE = deprecated("bundle"); /** -- * AVAILABLE BETWEEN VERSIONS: 1.19 - 1.19.4 -- * -- * @deprecated not available since 1.20 + * AVAILABLE BETWEEN VERSIONS: 1.19 - 1.19.4 + * + * @deprecated not available since 1.20 + * The {@code trade_rebalance} feature flag. */ -- @Deprecated +- @Deprecated(since = "1.20.2") - public static final FeatureFlag UPDATE_1_20 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_20")); -- ++ @Deprecated(since = "1.20") ++ FeatureFlag UPDATE_1_20 = deprecated("update_1_20"); + @ApiStatus.Experimental // Paper - add missing annotation - public static final FeatureFlag TRADE_REBALANCE = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("trade_rebalance")); + FeatureFlag TRADE_REBALANCE = create("trade_rebalance"); -- /** -- * AVAILABLE BETWEEN VERSIONS: 1.20.5 - 1.20.6 -- * -- * @deprecated not available since 1.21 -- */ -- @Deprecated + /** + * AVAILABLE BETWEEN VERSIONS: 1.20.5 - 1.20.6 +@@ -0,0 +0,0 @@ public interface FeatureFlag extends Keyed { + * @deprecated not available since 1.21 + */ + @Deprecated(since = "1.21") - public static final FeatureFlag UPDATE_121 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_21")); -+ @Deprecated(since = "1.20") -+ FeatureFlag UPDATE_1_20 = deprecated("update_1_20"); -+ -+ @Deprecated(since = "1.21") + FeatureFlag UPDATE_121 = deprecated("update_1_21"); @ApiStatus.Experimental // Paper - add missing annotation diff --git a/patches/api/Add-WaterBottleSplashEvent.patch b/patches/api/Add-WaterBottleSplashEvent.patch index 040bcd9e53..59de70fc1e 100644 --- a/patches/api/Add-WaterBottleSplashEvent.patch +++ b/patches/api/Add-WaterBottleSplashEvent.patch @@ -156,5 +156,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - private final Map affectedEntities; + protected final Map affectedEntities; // Paper - @Deprecated + @Deprecated(since = "1.20.2") public PotionSplashEvent(@NotNull final ThrownPotion potion, @NotNull final Map affectedEntities) { diff --git a/patches/api/Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/api/Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch index 5f7fda65e8..79011bb7b5 100644 --- a/patches/api/Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch +++ b/patches/api/Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/entity/AbstractSkeleton.java +++ b/src/main/java/org/bukkit/entity/AbstractSkeleton.java @@ -0,0 +0,0 @@ public interface AbstractSkeleton extends Monster, com.destroystokyo.paper.entit - @Deprecated + @Deprecated(since = "1.17") @Contract("_ -> fail") public void setSkeletonType(Skeleton.SkeletonType type); + diff --git a/patches/api/Add-critical-damage-API.patch b/patches/api/Add-critical-damage-API.patch index cedae1c964..9d55a43b31 100644 --- a/patches/api/Add-critical-damage-API.patch +++ b/patches/api/Add-critical-damage-API.patch @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final Entity damager; + private final boolean critical; // Paper - @Deprecated(forRemoval = true) + @Deprecated(since = "1.20.4", forRemoval = true) public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, final double damage) { this(damager, damagee, cause, DamageSource.builder(DamageType.GENERIC).withCausingEntity(damager).withDirectEntity(damager).build(), damage); } @@ -34,7 +34,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.critical = false; // Paper - add critical damage API } - @Deprecated(forRemoval = true) + @Deprecated(since = "1.20.4", forRemoval = true) @@ -0,0 +0,0 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent { this(damager, damagee, cause, DamageSource.builder(DamageType.GENERIC).withCausingEntity(damager).withDirectEntity(damager).build(), modifiers, modifierFunctions); } diff --git a/patches/api/Add-drops-to-shear-events.patch b/patches/api/Add-drops-to-shear-events.patch index 43e9d20c10..12c8d8bef4 100644 --- a/patches/api/Add-drops-to-shear-events.patch +++ b/patches/api/Add-drops-to-shear-events.patch @@ -69,7 +69,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.drops = drops; // Paper - custom shear drops } - @Deprecated + @Deprecated(since = "1.15.2") public PlayerShearEntityEvent(@NotNull final Player who, @NotNull final Entity what) { - this(who, what, new ItemStack(Material.SHEARS), EquipmentSlot.HAND); + this(who, what, new ItemStack(Material.SHEARS), EquipmentSlot.HAND, java.util.Collections.emptyList()); // Paper - custom shear drops diff --git a/patches/api/Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/api/Add-getMainThreadExecutor-to-BukkitScheduler.patch index 8dad29905f..2997e9db51 100644 --- a/patches/api/Add-getMainThreadExecutor-to-BukkitScheduler.patch +++ b/patches/api/Add-getMainThreadExecutor-to-BukkitScheduler.patch @@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/scheduler/BukkitScheduler.java +++ b/src/main/java/org/bukkit/scheduler/BukkitScheduler.java @@ -0,0 +0,0 @@ public interface BukkitScheduler { - @Deprecated + @Deprecated(since = "1.7.10") @NotNull public BukkitTask runTaskTimerAsynchronously(@NotNull Plugin plugin, @NotNull BukkitRunnable task, long delay, long period) throws IllegalArgumentException; + diff --git a/patches/api/Add-methods-for-working-with-arrows-stuck-in-living-.patch b/patches/api/Add-methods-for-working-with-arrows-stuck-in-living-.patch index 51848e555b..af4c137487 100644 --- a/patches/api/Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/patches/api/Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -32,8 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * * @param count amount of arrows in entity's body + * @param fireEvent whether to fire the {@link org.bukkit.event.entity.ArrowBodyCountChangeEvent} event - */ -- public void setArrowsInBody(int count); ++ */ + void setArrowsInBody(int count, boolean fireEvent); // Paper + + // Paper start - Add methods for working with arrows stuck in living entities @@ -43,7 +42,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * A value of 0 will cause the server to re-calculate the amount of ticks on the next tick. + * + * @param ticks Amount of ticks -+ */ + */ +- public void setArrowsInBody(int count); + void setNextArrowRemoval(@org.jetbrains.annotations.Range(from = 0, to = Integer.MAX_VALUE) int ticks); + + /** diff --git a/patches/api/Add-methods-to-get-translation-keys.patch b/patches/api/Add-methods-to-get-translation-keys.patch index 6bc4ccf795..3bf8821397 100644 --- a/patches/api/Add-methods-to-get-translation-keys.patch +++ b/patches/api/Add-methods-to-get-translation-keys.patch @@ -316,7 +316,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * Typed represents a subtype of {@link BlockType}s that have a known block @@ -0,0 +0,0 @@ public interface BlockType extends Keyed, Translatable { @Nullable - @Deprecated + @Deprecated(since = "1.20.6") Material asMaterial(); + + // Paper start - add Translatable @@ -568,7 +568,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * Typed represents a subtype of {@link ItemType}s that have a known item meta type @@ -0,0 +0,0 @@ public interface ItemType extends Keyed, Translatable { @Nullable - @Deprecated + @Deprecated(since = "1.20.6") Material asMaterial(); + + // Paper start - add Translatable diff --git a/patches/api/Add-more-Evoker-API.patch b/patches/api/Add-more-Evoker-API.patch index 0295b85bd1..e7edffa835 100644 --- a/patches/api/Add-more-Evoker-API.patch +++ b/patches/api/Add-more-Evoker-API.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/entity/Evoker.java @@ -0,0 +0,0 @@ public interface Evoker extends Spellcaster { */ - @Deprecated + @Deprecated(since = "1.11.2") void setCurrentSpell(@Nullable Spell spell); + + // Paper start diff --git a/patches/api/Add-more-advancement-API.patch b/patches/api/Add-more-advancement-API.patch index 8287fb183c..addad8cd42 100644 --- a/patches/api/Add-more-advancement-API.patch +++ b/patches/api/Add-more-advancement-API.patch @@ -177,7 +177,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/advancement/Advancement.java @@ -0,0 +0,0 @@ public interface Advancement extends Keyed { @NotNull - Collection getCriteria(); + AdvancementRequirements getRequirements(); + // Paper start /** diff --git a/patches/api/Add-more-fields-to-AsyncPreLoginEvent.patch b/patches/api/Add-more-fields-to-AsyncPreLoginEvent.patch index b78e0c3fd8..80ae69a1f9 100644 --- a/patches/api/Add-more-fields-to-AsyncPreLoginEvent.patch +++ b/patches/api/Add-more-fields-to-AsyncPreLoginEvent.patch @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + private final String hostname; // Paper private final boolean transferred; - @Deprecated + @Deprecated(since = "1.7.5") @@ -0,0 +0,0 @@ public class AsyncPlayerPreLoginEvent extends Event { } diff --git a/patches/api/Add-openSign-method-to-HumanEntity.patch b/patches/api/Add-openSign-method-to-HumanEntity.patch index 15bd7f6d14..acf78f4390 100644 --- a/patches/api/Add-openSign-method-to-HumanEntity.patch +++ b/patches/api/Add-openSign-method-to-HumanEntity.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -0,0 +0,0 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ - @Deprecated + @Deprecated(since = "1.12") public void setShoulderEntityRight(@Nullable Entity entity); + // Paper start - Add method to open already placed sign + /** diff --git a/patches/api/Add-setPlayerProfile-API-for-Skulls.patch b/patches/api/Add-setPlayerProfile-API-for-Skulls.patch index 7a34159024..81c1d29895 100644 --- a/patches/api/Add-setPlayerProfile-API-for-Skulls.patch +++ b/patches/api/Add-setPlayerProfile-API-for-Skulls.patch @@ -52,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java @@ -0,0 +0,0 @@ public interface SkullMeta extends ItemMeta { - @Deprecated + @Deprecated(since = "1.12.1") boolean setOwner(@Nullable String owner); + // Paper start diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index 96f1455d5c..2801ad7536 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -1562,7 +1562,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable; */ - @Deprecated + @Deprecated(since = "1.7.2") public interface UnsafeValues { + // Paper start + net.kyori.adventure.text.flattener.ComponentFlattener componentFlattener(); @@ -1714,7 +1714,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#getLines()}. + * @deprecated A sign may have multiple writable sides now. Use {@link Sign#getSide(Side)} and {@link SignSide#lines()}. */ - @Deprecated + @Deprecated(since = "1.20") @NotNull @@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable { * @param index Line number to get the text from, starting at 0 @@ -1723,7 +1723,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#getLine(int)}. + * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#line(int)}. */ - @Deprecated + @Deprecated(since = "1.20") @NotNull @@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable { * @param index Line number to set the text at, starting from 0 @@ -1732,7 +1732,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#setLine(int, String)}. + * @deprecated A sign may have multiple writable sides now. Use {@link #getSide(Side)} and {@link SignSide#line(int, net.kyori.adventure.text.Component)}. */ - @Deprecated + @Deprecated(since = "1.20") public void setLine(int index, @NotNull String line) throws IndexOutOfBoundsException; diff --git a/src/main/java/org/bukkit/block/sign/SignSide.java b/src/main/java/org/bukkit/block/sign/SignSide.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -1837,7 +1837,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return false; @@ -0,0 +0,0 @@ public abstract class Command { - @Deprecated + @Deprecated(since = "1.20.4") @Nullable public String getPermissionMessage() { - return permissionMessage; @@ -1846,7 +1846,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** @@ -0,0 +0,0 @@ public abstract class Command { - @Deprecated + @Deprecated(since = "1.20.4") @NotNull public Command setPermissionMessage(@Nullable String permissionMessage) { - this.permissionMessage = permissionMessage; @@ -2664,7 +2664,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * should use {@link #setResourcePack(String)}. + * should use {@link #setResourcePack(UUID, String, byte[], net.kyori.adventure.text.Component, boolean)}. */ - @Deprecated + @Deprecated(since = "1.7.2") public void setTexturePack(@NotNull String url); @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @throws IllegalArgumentException Thrown if the URL is null. @@ -2947,7 +2947,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated API behavior subject to change + * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} or {@link #sendTitlePart(net.kyori.adventure.title.TitlePart, Object)} */ - @Deprecated + @Deprecated(since = "1.8.7") public void sendTitle(@Nullable String title, @Nullable String subtitle); @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * @param fadeIn time in ticks for titles to fade in. Defaults to 10. @@ -3136,7 +3136,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end + - @Deprecated + @Deprecated(since = "1.19.4") public SignChangeEvent(@NotNull final Block theBlock, @NotNull final Player thePlayer, @NotNull final String[] theLines) { this(theBlock, thePlayer, theLines, Side.FRONT); } @@ -3467,9 +3467,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + public void disallow(@NotNull final Result result, @NotNull final net.kyori.adventure.text.Component message) { + this.result = result; - this.message = message; - } - ++ this.message = message; ++ } ++ + /** + * Disallows the player from logging in, with the given reason + * @@ -3482,8 +3482,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Deprecated + public void disallow(@NotNull final PlayerPreLoginEvent.Result result, @NotNull final net.kyori.adventure.text.Component message) { + this.result = result == null ? null : Result.valueOf(result.name()); -+ this.message = message; -+ } + this.message = message; + } + // Paper end + /** + * Gets the current kick message that will be used if getResult() != @@ -3508,7 +3508,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public void setKickMessage(@NotNull final String message) { + this.message = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(message); // Paper + } -+ + /** * Allows the player to log in */ @@ -3534,7 +3534,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** @@ -0,0 +0,0 @@ public class AsyncPlayerPreLoginEvent extends Event { - @Deprecated + @Deprecated(since = "1.3.2") public void disallow(@NotNull final PlayerPreLoginEvent.Result result, @NotNull final String message) { this.result = result == null ? null : Result.valueOf(result.name()); - this.message = message; @@ -3558,7 +3558,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * alternative for thread safe implementations. + * @deprecated Listening to this event forces chat to wait for the main thread, delaying chat messages. It is recommended to use {@link io.papermc.paper.event.player.AsyncChatEvent} instead, wherever possible. */ - @Deprecated + @Deprecated(since = "1.3.1") @Warning(reason = "Listening to this event forces chat to wait for the main thread, delaying chat messages.") diff --git a/src/main/java/org/bukkit/event/player/PlayerEvent.java b/src/main/java/org/bukkit/event/player/PlayerEvent.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -4947,7 +4947,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** @@ -0,0 +0,0 @@ public final class MapCursor { */ - @Deprecated + @Deprecated(since = "1.6.2") public MapCursor(byte x, byte y, byte direction, byte type, boolean visible) { - this(x, y, direction, type, visible, null); + this(x, y, direction, type, visible, (String) null); // Paper @@ -4970,7 +4970,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value, use {@link #MapCursor(byte, byte, byte, Type, boolean, String)} + * @deprecated Magic value. Use {@link #MapCursor(byte, byte, byte, Type, boolean, net.kyori.adventure.text.Component)} */ - @Deprecated + @Deprecated(since = "1.13") public MapCursor(byte x, byte y, byte direction, byte type, boolean visible, @Nullable String caption) { @@ -0,0 +0,0 @@ public final class MapCursor { setDirection(direction); @@ -4996,7 +4996,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.x = x; this.y = y; this.visible = visible; this.caption = caption; + setDirection(direction); + setRawType(type); - } ++ } + /** + * Initialize the map cursor. + * @@ -5011,7 +5011,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.x = x; this.y = y; this.visible = visible; this.caption = caption; + setDirection(direction); + setType(type); -+ } + } + // Paper end /** @@ -5290,7 +5290,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated use {@link #registerNewObjective(String, Criteria, String)} + * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component)} */ - @Deprecated + @Deprecated(since = "1.20.5") @NotNull @@ -0,0 +0,0 @@ public interface Scoreboard { * characters. @@ -5299,7 +5299,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated use {@link #registerNewObjective(String, Criteria, String, RenderType)} + * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component, RenderType)} */ - @Deprecated + @Deprecated(since = "1.20.5") @NotNull @@ -0,0 +0,0 @@ public interface Scoreboard { * characters. diff --git a/patches/api/Custom-Potion-Mixes.patch b/patches/api/Custom-Potion-Mixes.patch index bdb548d569..acb1a65bea 100644 --- a/patches/api/Custom-Potion-Mixes.patch +++ b/patches/api/Custom-Potion-Mixes.patch @@ -246,8 +246,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @return The list of effects * @deprecated Non-Functional */ -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.5") // Paper +- @Deprecated(since = "1.6.2") ++ @Deprecated(since = "1.6.2", forRemoval = true) // Paper @NotNull - public Collection getEffectsFromDamage(int damage); + // Paper start - make default @@ -262,7 +262,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated Upgraded / extended potions are now their own {@link PotionType} use {@link PotionType#getPotionEffects()} instead */ @NotNull -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.5") // Paper +- @Deprecated(since = "1.20.2") ++ @Deprecated(since = "1.20.2", forRemoval = true) // Paper public Collection getEffects(@NotNull PotionType type, boolean upgraded, boolean extended); } diff --git a/patches/api/Disable-deprecated-annotation-test.patch b/patches/api/Disable-deprecated-annotation-test.patch new file mode 100644 index 0000000000..9bfd1c9cda --- /dev/null +++ b/patches/api/Disable-deprecated-annotation-test.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke +Date: Tue, 3 Dec 2024 15:33:45 +0100 +Subject: [PATCH] Disable deprecated annotation test + + +diff --git a/src/test/java/org/bukkit/DeprecatedTest.java b/src/test/java/org/bukkit/DeprecatedTest.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/test/java/org/bukkit/DeprecatedTest.java ++++ b/src/test/java/org/bukkit/DeprecatedTest.java +@@ -0,0 +0,0 @@ import com.google.common.base.Joiner; + import java.util.ArrayList; + import java.util.List; + import org.bukkit.support.test.ClassNodeTest; ++import org.junit.jupiter.api.Disabled; + import org.objectweb.asm.Type; + import org.objectweb.asm.tree.AnnotationNode; + import org.objectweb.asm.tree.ClassNode; +@@ -0,0 +0,0 @@ import org.objectweb.asm.tree.FieldNode; + import org.objectweb.asm.tree.MethodNode; + import org.objectweb.asm.tree.RecordComponentNode; + ++@Disabled + public class DeprecatedTest { + + private static final String DEPRECATED_DESC = Type.getDescriptor(Deprecated.class); diff --git a/patches/api/Display-warning-on-deprecated-recipe-API.patch b/patches/api/Display-warning-on-deprecated-recipe-API.patch index 0aa767628f..31c122cd36 100644 --- a/patches/api/Display-warning-on-deprecated-recipe-API.patch +++ b/patches/api/Display-warning-on-deprecated-recipe-API.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java @@ -0,0 +0,0 @@ public class ShapedRecipe extends CraftingRecipe { - @Deprecated + @Deprecated(since = "1.12") public ShapedRecipe(@NotNull ItemStack result) { this(NamespacedKey.randomKey(), result); + new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper @@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java @@ -0,0 +0,0 @@ public class ShapelessRecipe extends CraftingRecipe { - @Deprecated + @Deprecated(since = "1.12") public ShapelessRecipe(@NotNull ItemStack result) { this(NamespacedKey.randomKey(), result); + new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper diff --git a/patches/api/Expand-ArmorStand-API.patch b/patches/api/Expand-ArmorStand-API.patch index 9485219ec4..61d23eeb88 100644 --- a/patches/api/Expand-ArmorStand-API.patch +++ b/patches/api/Expand-ArmorStand-API.patch @@ -163,7 +163,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @deprecated prefer {@link ArmorStand#getItem(EquipmentSlot)} // Paper */ @NotNull - @Deprecated + @Deprecated(since = "1.15.2") @@ -0,0 +0,0 @@ public interface ArmorStand extends LivingEntity { * @param item the item to hold * @see #getEquipment() @@ -171,7 +171,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * {@link EntityEquipment#setItemInHand(org.bukkit.inventory.ItemStack)} + * {@link ArmorStand#setItem(EquipmentSlot, ItemStack)} // Paper */ - @Deprecated + @Deprecated(since = "1.15.2") void setItemInHand(@Nullable ItemStack item); @@ -0,0 +0,0 @@ public interface ArmorStand extends LivingEntity { * @param tick {@code true} if this armour stand can tick, {@code false} otherwise diff --git a/patches/api/Expand-FallingBlock-API.patch b/patches/api/Expand-FallingBlock-API.patch index 8837cf557c..87d7068dae 100644 --- a/patches/api/Expand-FallingBlock-API.patch +++ b/patches/api/Expand-FallingBlock-API.patch @@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @deprecated Magic value. Use {@link #spawn(Location, Class, Consumer)} (or a variation thereof) in combination with {@link FallingBlock#setBlockData(BlockData)} */ - @Deprecated + @Deprecated(since = "1.7.5") @NotNull diff --git a/src/main/java/org/bukkit/entity/FallingBlock.java b/src/main/java/org/bukkit/entity/FallingBlock.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 diff --git a/patches/api/Expand-LingeringPotion-API.patch b/patches/api/Expand-LingeringPotion-API.patch index e026fefe14..03dd349f80 100644 --- a/patches/api/Expand-LingeringPotion-API.patch +++ b/patches/api/Expand-LingeringPotion-API.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final AreaEffectCloud entity; + private boolean allowEmptyAreaEffectCreation; // Paper - @Deprecated + @Deprecated(since = "1.20.2") public LingeringPotionSplashEvent(@NotNull final ThrownPotion potion, @NotNull final AreaEffectCloud entity) { @@ -0,0 +0,0 @@ public class LingeringPotionSplashEvent extends ProjectileHitEvent implements Ca return entity; diff --git a/patches/api/Expand-PlayerItemMendEvent.patch b/patches/api/Expand-PlayerItemMendEvent.patch index 6f46bff8c6..302c8d931a 100644 --- a/patches/api/Expand-PlayerItemMendEvent.patch +++ b/patches/api/Expand-PlayerItemMendEvent.patch @@ -82,5 +82,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } + // Paper end - @Deprecated + @Deprecated(since = "1.19.2") public PlayerItemMendEvent(@NotNull Player who, @NotNull ItemStack item, @NotNull ExperienceOrb experienceOrb, int repairAmount) { diff --git a/patches/api/Experimental-annotations-change.patch b/patches/api/Experimental-annotations-change.patch index c615b8bb1b..22dee223f8 100644 --- a/patches/api/Experimental-annotations-change.patch +++ b/patches/api/Experimental-annotations-change.patch @@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/FeatureFlag.java +++ b/src/main/java/org/bukkit/FeatureFlag.java @@ -0,0 +0,0 @@ public interface FeatureFlag extends Keyed { - @Deprecated + @Deprecated(since = "1.20.2") public static final FeatureFlag UPDATE_1_20 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_20")); + @ApiStatus.Experimental // Paper - add missing annotation @@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** @@ -0,0 +0,0 @@ public interface FeatureFlag extends Keyed { - @Deprecated + @Deprecated(since = "1.21") public static final FeatureFlag UPDATE_121 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_21")); + @ApiStatus.Experimental // Paper - add missing annotation diff --git a/patches/api/Expose-hand-during-BlockCanBuildEvent.patch b/patches/api/Expose-hand-during-BlockCanBuildEvent.patch index 59ed5baf82..2e524397e9 100644 --- a/patches/api/Expose-hand-during-BlockCanBuildEvent.patch +++ b/patches/api/Expose-hand-during-BlockCanBuildEvent.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final Player player; + private final org.bukkit.inventory.EquipmentSlot hand; // Paper - expose hand - @Deprecated + @Deprecated(since = "1.13.2") public BlockCanBuildEvent(@NotNull final Block block, @NotNull final BlockData type, final boolean canBuild) { - this(block, null, type, canBuild); + this(block, null, type, canBuild, org.bukkit.inventory.EquipmentSlot.HAND); // Paper - expose hand diff --git a/patches/api/Fix-BanList-API.patch b/patches/api/Fix-BanList-API.patch index 65c3ccdd14..f6c48f3d14 100644 --- a/patches/api/Fix-BanList-API.patch +++ b/patches/api/Fix-BanList-API.patch @@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/BanList.java @@ -0,0 +0,0 @@ public interface BanList { */ - @Deprecated + @Deprecated(since = "1.20.1") @Nullable - public BanEntry getBanEntry(@NotNull String target); + public > E getBanEntry(@NotNull String target); // Paper @@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * Gets a {@link BanEntry} by target. @@ -0,0 +0,0 @@ public interface BanList { */ - @Deprecated + @Deprecated(since = "1.20.1") @Nullable - public BanEntry addBan(@NotNull String target, @Nullable String reason, @Nullable Date expires, @Nullable String source); + public > E addBan(@NotNull String target, @Nullable String reason, @Nullable Date expires, @Nullable String source); // Paper diff --git a/patches/api/Fix-NotePlayEvent.patch b/patches/api/Fix-NotePlayEvent.patch index ca823c4ce0..1d24b54671 100644 --- a/patches/api/Fix-NotePlayEvent.patch +++ b/patches/api/Fix-NotePlayEvent.patch @@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param instrument the Instrument. Has no effect if null. - * @deprecated no effect on newer Minecraft versions */ -- @Deprecated +- @Deprecated(since = "1.13") public void setInstrument(@NotNull Instrument instrument) { if (instrument != null) { this.instrument = instrument; @@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param note the Note. Has no effect if null. - * @deprecated no effect on newer Minecraft versions */ -- @Deprecated +- @Deprecated(since = "1.13") public void setNote(@NotNull Note note) { if (note != null) { this.note = note; diff --git a/patches/api/Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/api/Fix-SpawnEggMeta-get-setSpawnedType.patch index ba7a263cde..94eeeacc62 100644 --- a/patches/api/Fix-SpawnEggMeta-get-setSpawnedType.patch +++ b/patches/api/Fix-SpawnEggMeta-get-setSpawnedType.patch @@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @return The entity type. May be null for implementation specific default. * @deprecated different types are different items */ -- @Deprecated -+ @Deprecated(forRemoval = true) // Paper +- @Deprecated(since = "1.13") ++ @Deprecated(since = "1.13", forRemoval = true) // Paper @Contract("-> fail") EntityType getSpawnedType(); @@ -21,8 +21,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * default. * @deprecated different types are different items */ -- @Deprecated -+ @Deprecated(forRemoval = true) // Paper +- @Deprecated(since = "1.13") ++ @Deprecated(since = "1.13", forRemoval = true) // Paper @Contract("_ -> fail") void setSpawnedType(EntityType type); diff --git a/patches/api/Fix-Spigot-annotation-mistakes.patch b/patches/api/Fix-Spigot-annotation-mistakes.patch index 0e0f3d5fe3..86023907a0 100644 --- a/patches/api/Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/Fix-Spigot-annotation-mistakes.patch @@ -21,8 +21,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @return a map view if it exists, or null otherwise - * @deprecated Magic value */ -- @Deprecated -+ //@Deprecated // Paper - Not a magic value +- @Deprecated(since = "1.6.2") ++ // @Deprecated(since = "1.6.2") // Paper - Not a magic value @Nullable public static MapView getMap(int id) { return server.getMap(id); @@ -48,8 +48,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Persistent storage of users should be by UUID as names are no longer - * unique past a single session. */ -- @Deprecated -+ // @Deprecated // Paper +- @Deprecated(since = "1.7.5") ++ // @Deprecated(since = "1.7.5") // Paper @NotNull public static OfflinePlayer getOfflinePlayer(@NotNull String name) { return server.getOfflinePlayer(name); @@ -97,7 +97,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public int getValue() { return value; @@ -109,7 +109,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable public static Difficulty getByValue(final int value) { @@ -125,7 +125,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public byte getWoolData() { return woolData; @@ -137,7 +137,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable public static DyeColor getByWoolData(final byte data) { @@ -149,7 +149,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated legacy use only + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.13") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @NotNull public static DyeColor legacyValueOf(@Nullable String name) { @@ -165,7 +165,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public int getId() { return this.id; @@ -177,7 +177,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable public static Effect getById(int id) { @@ -193,7 +193,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public byte getData() { return data; @@ -209,7 +209,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public int getValue() { return value; @@ -221,7 +221,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable public static GameMode getByValue(final int value) { @@ -282,7 +282,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @ApiStatus.Internal // Paper public int getId() { Preconditions.checkArgument(legacy, "Cannot get ID of Modern Material"); @@ -295,8 +295,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * * @return legacy status */ -- @Deprecated -+ // @Deprecated // Paper - this is useful, don't deprecate +- @Deprecated(since = "1.13") ++ // @Deprecated(since = "1.13") // Paper - this is useful, don't deprecate public boolean isLegacy() { return legacy; } @@ -371,7 +371,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public byte getId() { return getId(false); @@ -383,7 +383,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public byte getId(boolean sharped) { byte id = (byte) (sharped && sharpable ? this.id + 1 : this.id); @@ -395,7 +395,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public boolean isSharped(byte id) { if (id == getId(false)) { @@ -407,7 +407,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable public static Tone getById(byte id) { @@ -419,7 +419,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public byte getId() { return note; @@ -479,8 +479,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @return a map view if it exists, or null otherwise - * @deprecated Magic value */ -- @Deprecated -+ //@Deprecated // Paper - Not a magic value +- @Deprecated(since = "1.6.2") ++ // @Deprecated(since = "1.6.2") // Paper - Not a magic value @Nullable public MapView getMap(int id); @@ -506,8 +506,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Persistent storage of users should be by UUID as names are no longer - * unique past a single session. */ -- @Deprecated -+ // @Deprecated // Paper +- @Deprecated(since = "1.7.5") ++ // @Deprecated(since = "1.7.5") // Paper @NotNull public OfflinePlayer getOfflinePlayer(@NotNull String name); @@ -528,8 +528,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * Represents the different types of skulls. * @deprecated check {@link Material} instead */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.13") ++@Deprecated(since = "1.13", forRemoval = true) public enum SkullType { SKELETON, WITHER, @@ -541,8 +541,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * * @deprecated Deprecated, see usage methods for replacement(s) */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.19") +-@Deprecated(since = "1.19") ++@Deprecated(since = "1.19", forRemoval = true) public enum TreeSpecies { /** @@ -556,7 +556,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Retention(RetentionPolicy.CLASS) +@java.lang.annotation.Documented // Paper @ApiStatus.Internal - @Deprecated + @Deprecated(since = "1.13.2") public @interface UndefinedNullability { diff --git a/src/main/java/org/bukkit/Vibration.java b/src/main/java/org/bukkit/Vibration.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -599,8 +599,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * - * @deprecated This method is not guaranteed to work suitably across all client implementations. */ -- @Deprecated -+ //@Deprecated // Paper +- @Deprecated(since = "1.8") ++ // @Deprecated(since = "1.8") // Paper public boolean refreshChunk(int x, int z); /** @@ -631,7 +631,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public int getId() { return id; @@ -643,7 +643,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable public static Environment getEnvironment(int id) { @@ -729,7 +729,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public int getId() { return this.id; @@ -741,7 +741,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable public static PistonMoveReaction getById(int id) { @@ -754,8 +754,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * * @see BrushableBlock */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.20") +-@Deprecated(since = "1.20") ++@Deprecated(since = "1.20", forRemoval = true) public interface SuspiciousSand extends BrushableBlock { } diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java @@ -766,8 +766,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated enchantment groupings are now managed by tags, not categories */ @NotNull -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.5") @org.jetbrains.annotations.Contract("-> fail") // Paper +- @Deprecated(since = "1.20.5") ++ @Deprecated(since = "1.20.5", forRemoval = true) @org.jetbrains.annotations.Contract("-> fail") // Paper public abstract EnchantmentTarget getItemTarget(); /** @@ -819,7 +819,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Contract("null -> null") @Nullable @@ -877,8 +877,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @deprecated should not be used for anything, use {@link ThrownPotion} and + * set the potion via the methods there. */ --@Deprecated -+@Deprecated(forRemoval = true) // Paper +-@Deprecated(since = "1.20.5") ++@Deprecated(since = "1.20.5", forRemoval = true) // Paper public interface LingeringPotion extends ThrownPotion { } diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -898,8 +898,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated entity groupings are now managed by tags, not categories */ @NotNull -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.5") @org.jetbrains.annotations.Contract("-> fail") // Paper +- @Deprecated(since = "1.20.5") ++ @Deprecated(since = "1.20.5", forRemoval = true) @org.jetbrains.annotations.Contract("-> fail") // Paper public EntityCategory getCategory(); /** @@ -966,8 +966,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @return true if it should bounce. * @deprecated does not do anything */ -- @Deprecated -+ @Deprecated(forRemoval = true) +- @Deprecated(since = "1.20.2") ++ @Deprecated(since = "1.20.2", forRemoval = true) public boolean doesBounce(); /** @@ -975,8 +975,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param doesBounce whether or not it should bounce. * @deprecated does not do anything */ -- @Deprecated -+ @Deprecated(forRemoval = true) +- @Deprecated(since = "1.20.2") ++ @Deprecated(since = "1.20.2", forRemoval = true) public void setBounce(boolean doesBounce); } diff --git a/src/main/java/org/bukkit/entity/SplashPotion.java b/src/main/java/org/bukkit/entity/SplashPotion.java @@ -991,8 +991,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @deprecated should not be used for anything, use {@link ThrownPotion} and + * set the potion via the methods there. */ --@Deprecated -+@Deprecated(forRemoval = true) // Paper +-@Deprecated(since = "1.14") ++@Deprecated(since = "1.14", forRemoval = true) // Paper public interface SplashPotion extends ThrownPotion { } diff --git a/src/main/java/org/bukkit/entity/ZombieVillager.java b/src/main/java/org/bukkit/entity/ZombieVillager.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -1265,8 +1265,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * * @deprecated use {@link #SMITHING} */ -- @Deprecated -+ @Deprecated(forRemoval = true) // Paper +- @Deprecated(since = "1.20.1") ++ @Deprecated(since = "1.20.1", forRemoval = true) // Paper SMITHING_NEW(4, "Upgrade Gear", MenuType.SMITHING), ; @@ -1510,7 +1510,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public int getId() { return id; @@ -1579,8 +1579,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param data the data value or null * @deprecated this method uses an ambiguous data byte object */ -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.13") +- @Deprecated(since = "1.4.5") ++ @Deprecated(since = "1.4.5", forRemoval = true) public ItemStack(@NotNull Material type, final int amount, final short damage, @Nullable final Byte data) { Preconditions.checkArgument(type != null, "Material cannot be null"); if (type.isLegacy()) { @@ -1798,8 +1798,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * for example will generate a new map with a different ID). The xxxMapView - * family of methods should be used instead. */ -- @Deprecated -+ //@Deprecated // Paper +- @Deprecated(since = "1.13.2") ++ //@Deprecated(since = "1.13.2") // Paper boolean hasMapId(); /** @@ -1813,8 +1813,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * for example will generate a new map with a different ID). The xxxMapView - * family of methods should be used instead. */ -- @Deprecated -+ //@Deprecated // Paper +- @Deprecated(since = "1.13.2") ++ // @Deprecated(since = "1.13.2") // Paper int getMapId(); /** @@ -1842,8 +1842,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value, use {@link #getPixelColor(int, int)} + * @deprecated use {@link #getPixelColor(int, int)} */ -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper +- @Deprecated(since = "1.19") ++ @Deprecated(since = "1.19", forRemoval = true) // Paper public byte getPixel(int x, int y); /** @@ -1854,8 +1854,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value, use {@link #getBasePixelColor(int, int)} + * @deprecated use {@link #getBasePixelColor(int, int)} */ -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper +- @Deprecated(since = "1.19") ++ @Deprecated(since = "1.19", forRemoval = true) // Paper public byte getBasePixel(int x, int y); /** @@ -1870,7 +1870,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public byte getRawType() { return type.getValue(); @@ -1882,8 +1882,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @deprecated use {@link #setType(Type)} */ -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper +- @Deprecated(since = "1.6.2") ++ @Deprecated(since = "1.6.2", forRemoval = true) // Paper public void setRawType(byte type) { Type enumType = Type.byValue(type); Preconditions.checkArgument(enumType != null, "Unknown type by id %s", type); @@ -1894,7 +1894,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper byte getValue(); @@ -1906,7 +1906,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable static Type byValue(byte value) { @@ -1922,8 +1922,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @deprecated use color-related methods */ -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper +- @Deprecated(since = "1.6.2") ++ @Deprecated(since = "1.6.2", forRemoval = true) // Paper @NotNull public static byte[] imageToBytes(@NotNull Image image) { BufferedImage temp = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_ARGB); @@ -1934,8 +1934,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @deprecated use color-related methods */ -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper +- @Deprecated(since = "1.6.2") ++ @Deprecated(since = "1.6.2", forRemoval = true) // Paper public static byte matchColor(int r, int g, int b) { return matchColor(new Color(r, g, b)); } @@ -1946,8 +1946,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @deprecated use color-related methods */ -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper +- @Deprecated(since = "1.6.2") ++ @Deprecated(since = "1.6.2", forRemoval = true) // Paper public static byte matchColor(@NotNull Color color) { if (color.getAlpha() < 128) return 0; @@ -1958,8 +1958,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @deprecated use color directly */ -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper +- @Deprecated(since = "1.6.2") ++ @Deprecated(since = "1.6.2", forRemoval = true) // Paper @NotNull public static Color getColor(byte index) { // Minecraft has 143 colors, some of which have negative byte representations @@ -1970,7 +1970,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.19") + @org.jetbrains.annotations.ApiStatus.Internal // Paper byte matchColor(@NotNull Color color); } @@ -1986,7 +1986,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable public static Scale valueOf(byte value) { @@ -1998,7 +1998,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public byte getValue() { return value; @@ -2011,7 +2011,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated +-@Deprecated(since = "1.14.1") +@Deprecated(forRemoval = true, since = "1.13") public class Banner extends MaterialData implements Attachable { @@ -2024,7 +2024,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated +-@Deprecated(since = "1.14.1") +@Deprecated(forRemoval = true, since = "1.13") public class Bed extends MaterialData implements Directional { @@ -2037,7 +2037,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated +-@Deprecated(since = "1.14.1") +@Deprecated(forRemoval = true, since = "1.13") public class Button extends SimpleAttachableMaterialData implements Redstone { public Button() { @@ -2050,8 +2050,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Cake extends MaterialData { public Cake() { super(Material.LEGACY_CAKE_BLOCK); @@ -2063,8 +2063,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Cauldron extends MaterialData { private static final int CAULDRON_FULL = 3; private static final int CAULDRON_EMPTY = 0; @@ -2076,8 +2076,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Chest extends DirectionalContainer { public Chest() { @@ -2089,8 +2089,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Coal extends MaterialData { public Coal() { super(Material.LEGACY_COAL); @@ -2102,8 +2102,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class CocoaPlant extends MaterialData implements Directional, Attachable { public enum CocoaPlantSize { @@ -2115,8 +2115,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Command extends MaterialData implements Redstone { public Command() { super(Material.LEGACY_COMMAND); @@ -2128,8 +2128,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Comparator extends MaterialData implements Directional, Redstone { protected static final BlockFace DEFAULT_DIRECTION = BlockFace.NORTH; protected static final boolean DEFAULT_SUBTRACTION_MODE = false; @@ -2141,8 +2141,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Crops extends MaterialData { protected static final Material DEFAULT_TYPE = Material.LEGACY_CROPS; protected static final CropState DEFAULT_STATE = CropState.SEEDED; @@ -2154,8 +2154,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class DetectorRail extends ExtendedRails implements PressureSensor { public DetectorRail() { super(Material.LEGACY_DETECTOR_RAIL); @@ -2167,8 +2167,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Diode extends MaterialData implements Directional, Redstone { protected static final BlockFace DEFAULT_DIRECTION = BlockFace.NORTH; @@ -2180,8 +2180,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class DirectionalContainer extends MaterialData implements Directional { public DirectionalContainer(final Material type) { @@ -2193,8 +2193,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Dispenser extends FurnaceAndDispenser { public Dispenser() { @@ -2206,8 +2206,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Door extends MaterialData implements Directional, Openable { // This class breaks API contracts on Directional and Openable because @@ -2219,8 +2219,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Dye extends MaterialData implements Colorable { public Dye() { super(Material.LEGACY_INK_SACK); @@ -2232,8 +2232,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class EnderChest extends DirectionalContainer { public EnderChest() { @@ -2245,8 +2245,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class ExtendedRails extends Rails { public ExtendedRails(final Material type) { @@ -2258,8 +2258,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.9.4") ++@Deprecated(since = "1.13", forRemoval = true) public class FlowerPot extends MaterialData { /** @@ -2271,8 +2271,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Furnace extends FurnaceAndDispenser { public Furnace() { @@ -2284,8 +2284,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class FurnaceAndDispenser extends DirectionalContainer { public FurnaceAndDispenser(final Material type) { @@ -2297,8 +2297,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Gate extends MaterialData implements Directional, Openable { private static final byte OPEN_BIT = 0x4; private static final byte DIR_BIT = 0x3; @@ -2310,8 +2310,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Hopper extends MaterialData implements Directional, Redstone { protected static final BlockFace DEFAULT_DIRECTION = BlockFace.DOWN; @@ -2323,8 +2323,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Ladder extends SimpleAttachableMaterialData { public Ladder() { super(Material.LEGACY_LADDER); @@ -2336,8 +2336,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Leaves extends Wood { protected static final Material DEFAULT_TYPE = Material.LEGACY_LEAVES; protected static final boolean DEFAULT_DECAYABLE = true; @@ -2349,8 +2349,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Lever extends SimpleAttachableMaterialData implements Redstone { public Lever() { super(Material.LEGACY_LEVER); @@ -2362,8 +2362,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class LongGrass extends MaterialData { public LongGrass() { super(Material.LEGACY_LONG_GRASS); @@ -2375,8 +2375,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.13") ++@Deprecated(since = "1.13", forRemoval = true) public class MaterialData implements Cloneable { private final Material type; private byte data = 0; @@ -2388,8 +2388,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class MonsterEggs extends TexturedMaterial { private static final List textures = new ArrayList(); @@ -2401,8 +2401,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Mushroom extends MaterialData { private static final byte NORTH_LIMIT = 4; private static final byte SOUTH_LIMIT = 6; @@ -2414,8 +2414,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class NetherWarts extends MaterialData { public NetherWarts() { super(Material.LEGACY_NETHER_WARTS); @@ -2427,8 +2427,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Observer extends MaterialData implements Directional, Redstone { public Observer() { @@ -2451,8 +2451,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class PistonBaseMaterial extends MaterialData implements Directional, Redstone { public PistonBaseMaterial(final Material type) { @@ -2464,8 +2464,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class PistonExtensionMaterial extends MaterialData implements Attachable { public PistonExtensionMaterial(final Material type) { @@ -2477,8 +2477,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class PoweredRail extends ExtendedRails implements Redstone { public PoweredRail() { super(Material.LEGACY_POWERED_RAIL); @@ -2490,8 +2490,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class PressurePlate extends MaterialData implements PressureSensor { public PressurePlate() { super(Material.LEGACY_WOOD_PLATE); @@ -2503,8 +2503,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Pumpkin extends MaterialData implements Directional { public Pumpkin() { @@ -2516,8 +2516,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Rails extends MaterialData { public Rails() { @@ -2541,8 +2541,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class RedstoneTorch extends Torch implements Redstone { public RedstoneTorch() { super(Material.LEGACY_REDSTONE_TORCH_ON); @@ -2554,8 +2554,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class RedstoneWire extends MaterialData implements Redstone { public RedstoneWire() { super(Material.LEGACY_REDSTONE_WIRE); @@ -2567,8 +2567,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Sandstone extends MaterialData { public Sandstone() { super(Material.LEGACY_SANDSTONE); @@ -2580,8 +2580,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Sapling extends Wood { /** @@ -2593,8 +2593,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Sign extends MaterialData implements Attachable { public Sign() { super(Material.LEGACY_SIGN_POST); @@ -2606,8 +2606,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public abstract class SimpleAttachableMaterialData extends MaterialData implements Attachable { public SimpleAttachableMaterialData(Material type, BlockFace direction) { @@ -2619,8 +2619,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Skull extends MaterialData implements Directional { public Skull() { super(Material.LEGACY_SKULL); @@ -2632,8 +2632,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class SmoothBrick extends TexturedMaterial { private static final List textures = new ArrayList(); @@ -2645,8 +2645,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * Represents a spawn egg that can be used to spawn mobs * @deprecated use {@link SpawnEggMeta} */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.11") ++@Deprecated(since = "1.13", forRemoval = true) public class SpawnEgg extends MaterialData { public SpawnEgg() { @@ -2658,8 +2658,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Stairs extends MaterialData implements Directional { public Stairs(final Material type) { @@ -2671,8 +2671,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Step extends TexturedMaterial { private static final List textures = new ArrayList(); static { @@ -2684,8 +2684,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public abstract class TexturedMaterial extends MaterialData { public TexturedMaterial(Material m) { @@ -2697,8 +2697,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Torch extends SimpleAttachableMaterialData { public Torch() { super(Material.LEGACY_TORCH); @@ -2710,8 +2710,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class TrapDoor extends SimpleAttachableMaterialData implements Openable { public TrapDoor() { super(Material.LEGACY_TRAP_DOOR); @@ -2723,8 +2723,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Tree extends Wood { protected static final Material DEFAULT_TYPE = Material.LEGACY_LOG; protected static final BlockFace DEFAULT_DIRECTION = BlockFace.UP; @@ -2736,8 +2736,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Tripwire extends MaterialData { public Tripwire() { @@ -2749,8 +2749,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class TripwireHook extends SimpleAttachableMaterialData implements Redstone { public TripwireHook() { @@ -2762,8 +2762,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Vine extends MaterialData { private static final int VINE_NORTH = 0x4; private static final int VINE_EAST = 0x8; @@ -2775,8 +2775,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Wood extends MaterialData { protected static final Material DEFAULT_TYPE = Material.LEGACY_WOOD; protected static final TreeSpecies DEFAULT_SPECIES = TreeSpecies.GENERIC; @@ -2788,8 +2788,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class WoodenStep extends Wood { protected static final Material DEFAULT_TYPE = Material.LEGACY_WOOD_STEP; protected static final boolean DEFAULT_INVERTED = false; @@ -2801,8 +2801,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @deprecated all usage of MaterialData is deprecated and subject to removal. * Use {@link org.bukkit.block.data.BlockData}. */ --@Deprecated -+@Deprecated(forRemoval = true, since = "1.13") +-@Deprecated(since = "1.14.1") ++@Deprecated(since = "1.13", forRemoval = true) public class Wool extends MaterialData implements Colorable { public Wool() { super(Material.LEGACY_WOOL); @@ -2831,8 +2831,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @deprecated use {@link #key()} */ -- @Deprecated -+ @Deprecated(forRemoval = true, since = "1.20.2") // Paper +- @Deprecated(since = "1.6.2") ++ @Deprecated(since = "1.6.2", forRemoval = true) // Paper public abstract int getId(); /** @@ -2843,7 +2843,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated Magic value + * @apiNote Internal Use Only */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable public static PotionEffectType getById(int id) { diff --git a/patches/api/Fix-equipment-slot-and-group-API.patch b/patches/api/Fix-equipment-slot-and-group-API.patch index bc470bb53f..6b3d970702 100644 --- a/patches/api/Fix-equipment-slot-and-group-API.patch +++ b/patches/api/Fix-equipment-slot-and-group-API.patch @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed { */ @Nullable - @Deprecated + @Deprecated(since = "1.20.5") + @io.papermc.paper.annotation.DoNotUse // Paper public EquipmentSlot getSlot() { return slot == EquipmentSlotGroup.ANY ? null : slot.getExample(); diff --git a/patches/api/Fix-upstream-javadocs.patch b/patches/api/Fix-upstream-javadocs.patch index 6d6c18bcc4..d212be493a 100644 --- a/patches/api/Fix-upstream-javadocs.patch +++ b/patches/api/Fix-upstream-javadocs.patch @@ -241,10 +241,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * Represents a captured state of a bed. - * @deprecated does not provide useful information beyond the material itself */ --@Deprecated +-@Deprecated(since = "1.13") -public interface Bed extends TileState, Colorable { } +// Paper start -+// @Deprecated ++// @Deprecated(since = "1.13") +public interface Bed extends TileState, Colorable { + + @Override @@ -377,7 +377,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * @deprecated use {@link #getAttachedFace()} + * @deprecated use {@link #setAttachedFace(AttachedFace)} */ - @Deprecated + @Deprecated(since = "1.15.2") void setFace(@NotNull Face face); @@ -0,0 +0,0 @@ public interface Switch extends Directional, FaceAttachable, Powerable { */ @@ -1091,8 +1091,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * @deprecated This is simply the online players. Modifications have no effect */ @NotNull -- @Deprecated -+ @Deprecated(forRemoval = true) +- @Deprecated(since = "1.3.1") ++ @Deprecated(since = "1.3.1", forRemoval = true) public Set getRecipients() { return recipients; } diff --git a/patches/api/Implement-regenerateChunk.patch b/patches/api/Implement-regenerateChunk.patch index bd83bf80d4..c309ce55fa 100644 --- a/patches/api/Implement-regenerateChunk.patch +++ b/patches/api/Implement-regenerateChunk.patch @@ -17,5 +17,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + * 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 + @Deprecated(since = "1.13") public boolean regenerateChunk(int x, int z); diff --git a/patches/api/Improve-scoreboard-entries.patch b/patches/api/Improve-scoreboard-entries.patch index 8b20a11595..a788d2b3d4 100644 --- a/patches/api/Improve-scoreboard-entries.patch +++ b/patches/api/Improve-scoreboard-entries.patch @@ -14,8 +14,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @see #getScore(String) - * @deprecated Scoreboards can contain entries that aren't players */ -- @Deprecated -+ // @Deprecated // Paper +- @Deprecated(since = "1.7.8") ++ // @Deprecated(since = "1.7.8") // Paper @NotNull Score getScore(@NotNull OfflinePlayer player); @@ -46,8 +46,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @see #getScores(String) - * @deprecated Scoreboards can contain entries that aren't players */ -- @Deprecated -+ // @Deprecated // Paper +- @Deprecated(since = "1.7.8") ++ // @Deprecated(since = "1.7.8") // Paper @NotNull Set getScores(@NotNull OfflinePlayer player); @@ -57,8 +57,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @see #resetScores(String) - * @deprecated Scoreboards can contain entries that aren't players */ -- @Deprecated -+ // @Deprecated // Paper +- @Deprecated(since = "1.7.8") ++ // @Deprecated(since = "1.7.8") // Paper void resetScores(@NotNull OfflinePlayer player); /** @@ -68,8 +68,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @see #getEntryTeam(String) - * @deprecated Scoreboards can contain entries that aren't players */ -- @Deprecated -+ // @Deprecated // Paper +- @Deprecated(since = "1.8.6") ++ // @Deprecated(since = "1.8.6") // Paper @Nullable Team getPlayerTeam(@NotNull OfflinePlayer player); @@ -119,8 +119,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @see #addEntry(String) - * @deprecated Teams can contain entries that aren't players */ -- @Deprecated -+ // @Deprecated // Paper +- @Deprecated(since = "1.8.6") ++ // @Deprecated(since = "1.8.6") // Paper void addPlayer(@NotNull OfflinePlayer player); /** @@ -130,8 +130,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @see #removeEntry(String) - * @deprecated Teams can contain entries that aren't players */ -- @Deprecated -+ // @Deprecated // Paper +- @Deprecated(since = "1.8.6") ++ // @Deprecated(since = "1.8.6") // Paper boolean removePlayer(@NotNull OfflinePlayer player); /** @@ -141,8 +141,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @see #hasEntry(String) - * @deprecated Teams can contain entries that aren't players */ -- @Deprecated -+ // @Deprecated // Paper +- @Deprecated(since = "1.8.6") ++ // @Deprecated(since = "1.8.6") // Paper boolean hasPlayer(@NotNull OfflinePlayer player); /** * Checks to see if the specified entry is a member of this team. diff --git a/patches/api/Missing-Entity-API.patch b/patches/api/Missing-Entity-API.patch index 60178abc3f..43997f3d29 100644 --- a/patches/api/Missing-Entity-API.patch +++ b/patches/api/Missing-Entity-API.patch @@ -426,7 +426,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/entity/Endermite.java @@ -0,0 +0,0 @@ public interface Endermite extends Monster { */ - @Deprecated + @Deprecated(since = "1.17") void setPlayerSpawned(boolean playerSpawned); + // Paper start + /** diff --git a/patches/api/More-Enchantment-API.patch b/patches/api/More-Enchantment-API.patch index 10f513d329..1ab0fbf2b8 100644 --- a/patches/api/More-Enchantment-API.patch +++ b/patches/api/More-Enchantment-API.patch @@ -52,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - * only for {@link Enchantment#BINDING_CURSE} and - * {@link Enchantment#VANISHING_CURSE}. */ -- @Deprecated +- @Deprecated(since = "1.13") public abstract boolean isCursed(); /** diff --git a/patches/api/More-Projectile-API.patch b/patches/api/More-Projectile-API.patch index 0b1de7e3e4..ede62bbfe7 100644 --- a/patches/api/More-Projectile-API.patch +++ b/patches/api/More-Projectile-API.patch @@ -261,7 +261,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public ProjectileSource getShooter(); @@ -0,0 +0,0 @@ public interface Projectile extends Entity { */ - @Deprecated(forRemoval = true) + @Deprecated(since = "1.20.2", forRemoval = true) public void setBounce(boolean doesBounce); + // Paper start + diff --git a/patches/api/Option-to-prevent-data-components-copy-in-smithing-r.patch b/patches/api/Option-to-prevent-data-components-copy-in-smithing-r.patch index 909559a227..5048041d8c 100644 --- a/patches/api/Option-to-prevent-data-components-copy-in-smithing-r.patch +++ b/patches/api/Option-to-prevent-data-components-copy-in-smithing-r.patch @@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * Create a smithing recipe to produce the specified result ItemStack. @@ -0,0 +0,0 @@ public class SmithingRecipe implements Recipe, Keyed { */ - @Deprecated + @Deprecated(since = "1.20.1") public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) { + // Paper start + this(key, result, base, addition, true); diff --git a/patches/api/Paper-Plugins.patch b/patches/api/Paper-Plugins.patch index 2dc3870b7e..ed59d40676 100644 --- a/patches/api/Paper-Plugins.patch +++ b/patches/api/Paper-Plugins.patch @@ -1730,7 +1730,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 addPermission(perm, true); } - @Deprecated + @Deprecated(since = "1.12") public void addPermission(@NotNull Permission perm, boolean dirty) { + if (true) {this.paperPluginManager.addPermission(perm); return;} // Paper - This just has a performance implication, use the better api to avoid this. String name = perm.getName().toLowerCase(Locale.ROOT); diff --git a/patches/api/Proxy-ItemStack-to-CraftItemStack.patch b/patches/api/Proxy-ItemStack-to-CraftItemStack.patch index 5e367bf7f4..40f82411d1 100644 --- a/patches/api/Proxy-ItemStack-to-CraftItemStack.patch +++ b/patches/api/Proxy-ItemStack-to-CraftItemStack.patch @@ -185,7 +185,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** @@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat */ - @Deprecated + @Deprecated(since = "1.13") public void setDurability(final short durability) { - ItemMeta meta = getItemMeta(); - if (meta != null) { @@ -198,7 +198,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 /** @@ -0,0 +0,0 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat */ - @Deprecated + @Deprecated(since = "1.13") public short getDurability() { - ItemMeta meta = getItemMeta(); - return (meta == null) ? 0 : (short) ((Damageable) meta).getDamage(); diff --git a/patches/api/add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/api/add-RespawnFlags-to-PlayerRespawnEvent.patch index 8cb281d229..e76ee46aed 100644 --- a/patches/api/add-RespawnFlags-to-PlayerRespawnEvent.patch +++ b/patches/api/add-RespawnFlags-to-PlayerRespawnEvent.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final RespawnReason respawnReason; + private final java.util.Set respawnFlags; // Paper - @Deprecated + @Deprecated(since = "1.16.1") public PlayerRespawnEvent(@NotNull final Player respawnPlayer, @NotNull final Location respawnLocation, final boolean isBedSpawn) { @@ -0,0 +0,0 @@ public class PlayerRespawnEvent extends PlayerEvent { this(respawnPlayer, respawnLocation, isBedSpawn, false, RespawnReason.PLUGIN); diff --git a/patches/api/fix-Instruments.patch b/patches/api/fix-Instruments.patch index 88286c940b..336b245701 100644 --- a/patches/api/fix-Instruments.patch +++ b/patches/api/fix-Instruments.patch @@ -82,7 +82,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @return The type ID of this instrument. - * @deprecated Magic value */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper public byte getType() { return this.type; @@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @return The instrument - * @deprecated Magic value */ -- @Deprecated +- @Deprecated(since = "1.6.2") + @org.jetbrains.annotations.ApiStatus.Internal // Paper @Nullable public static Instrument getByType(final byte type) { diff --git a/patches/server/Add-missing-important-BlockStateListPopulator-method.patch b/patches/server/Add-missing-important-BlockStateListPopulator-method.patch index d9561cfc1e..b05a27bfe7 100644 --- a/patches/server/Add-missing-important-BlockStateListPopulator-method.patch +++ b/patches/server/Add-missing-important-BlockStateListPopulator-method.patch @@ -19,8 +19,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override @@ -0,0 +0,0 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { - public long nextSubTickCount() { - return this.world.nextSubTickCount(); + public RandomSource getRandom() { + return this.world.getRandom(); } + + // Paper start diff --git a/patches/server/Add-more-advancement-API.patch b/patches/server/Add-more-advancement-API.patch index 899a0a9733..301957bfbb 100644 --- a/patches/server/Add-more-advancement-API.patch +++ b/patches/server/Add-more-advancement-API.patch @@ -100,7 +100,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java +++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java @@ -0,0 +0,0 @@ public class CraftAdvancement implements org.bukkit.advancement.Advancement { - return Collections.unmodifiableCollection(this.handle.value().criteria().keySet()); + return new CraftAdvancementRequirements(this.handle.value().requirements()); } + // Paper start - Add more advancement API diff --git a/patches/server/CB-fixes.patch b/patches/server/CB-fixes.patch index b91036b94a..f67517e48d 100644 --- a/patches/server/CB-fixes.patch +++ b/patches/server/CB-fixes.patch @@ -53,6 +53,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 ChunkGenerator chunkGenerator, RandomState noiseConfig, LevelHeightAccessor world, +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +@@ -0,0 +0,0 @@ public class CraftChunk implements Chunk { + } + } + +- return new CraftChunkSnapshot(x, z, world.getMinHeight(), world.getMaxHeight(), world.getSeaLevel(), world.getName(), world.getFullTime(), blockIDs, skyLight, emitLight, empty, new Heightmap(actual, Heightmap.Types.MOTION_BLOCKING), iregistry, biome); ++ return new CraftChunkSnapshot(x, z, world.getMinHeight(), world.getMaxY(), world.getSeaLevel(), world.getName(), world.getFullTime(), blockIDs, skyLight, emitLight, empty, new Heightmap(actual, Heightmap.Types.MOTION_BLOCKING), iregistry, biome); + } + + static void validateChunkCoordinates(int minY, int maxY, int x, int y, int z) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java @@ -69,6 +82,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end } +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +@@ -0,0 +0,0 @@ public class CraftWorld extends CraftRegionAccessor implements World { + return this.world.getMaxY() + 1; + } + ++ public int getMaxY() { ++ return this.world.getMaxY(); ++ } ++ + @Override + public int getLogicalHeight() { + return this.world.dimensionType().logicalHeight(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/patches/server/Call-ProjectileHitEvent-for-entity-hits.patch b/patches/server/Call-ProjectileHitEvent-for-entity-hits.patch deleted file mode 100644 index 1bd67b5251..0000000000 --- a/patches/server/Call-ProjectileHitEvent-for-entity-hits.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Bjarne Koll -Date: Sat, 23 Nov 2024 22:48:26 +0100 -Subject: [PATCH] Call ProjectileHitEvent for entity hits - -A simple bugfix replacing a new vanilla call to -Projectile#hitTargetOrDeflectSelf with the bukkit replacement to call -the event. - -diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -0,0 +0,0 @@ public abstract class AbstractArrow extends Projectile { - continue; - } - -- ProjectileDeflection projectiledeflection = this.hitTargetOrDeflectSelf(movingobjectpositionentity); -+ ProjectileDeflection projectiledeflection = this.preHitTargetOrDeflectSelf(movingobjectpositionentity); // Paper - also call projectile hit event - - this.hasImpulse = true; - if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) { diff --git a/patches/server/Fix-issues-with-mob-conversion.patch b/patches/server/Fix-issues-with-mob-conversion.patch index eec0a510b2..51287748f8 100644 --- a/patches/server/Fix-issues-with-mob-conversion.patch +++ b/patches/server/Fix-issues-with-mob-conversion.patch @@ -38,10 +38,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } private void finishConversion() { -- this.convertTo( -+ net.minecraft.world.entity.Entity converted = this.convertTo( // Paper - Fix issues with mob conversion; reset to prevent event spam - EntityType.ZOGLIN, ConversionParams.single(this, true, false), zoglin -> zoglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0)) - ); +- this.convertTo(EntityType.ZOGLIN, ConversionParams.single(this, true, false), (entityzoglin) -> { ++ net.minecraft.world.entity.Entity converted = this.convertTo(EntityType.ZOGLIN, ConversionParams.single(this, true, false), (entityzoglin) -> { + entityzoglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0)); + }, org.bukkit.event.entity.EntityTransformEvent.TransformReason.PIGLIN_ZOMBIFIED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PIGLIN_ZOMBIFIED); // CraftBukkit - add spawn and transform reasons + + // Paper start - Fix issues with mob conversion; reset to prevent event spam + if (converted == null) { diff --git a/patches/server/Improved-Async-Task-Scheduler.patch b/patches/server/Improved-Async-Task-Scheduler.patch index 7d1a7109ff..52795534c6 100644 --- a/patches/server/Improved-Async-Task-Scheduler.patch +++ b/patches/server/Improved-Async-Task-Scheduler.patch @@ -330,10 +330,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - private void addTask(final CraftTask task) { + protected void addTask(final CraftTask task) { - final AtomicReference tail = this.tail; - CraftTask tailTask = tail.get(); - while (!tail.compareAndSet(tailTask, task)) { -@@ -0,0 +0,0 @@ public class CraftScheduler implements BukkitScheduler { + final CraftTask tailTask = this.tail.getAndSet(task); tailTask.setNext(task); } diff --git a/work/Bukkit b/work/Bukkit index 36b11391a2..ed0ec4893b 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 36b11391a2c0213669acfa9b863a3a3704374fbc +Subproject commit ed0ec4893b5f755e2493e652091bba42dc7ad742 diff --git a/work/CraftBukkit b/work/CraftBukkit index a71a7e1f57..40dd796db6 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit a71a7e1f57653334d66e389d162a437b1491bfc8 +Subproject commit 40dd796db69931bd3b5220f2ee4d734a8bd44c9d diff --git a/work/Spigot b/work/Spigot index e65d67a7a9..60c9969b3e 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit e65d67a7a97d6502296109d5c295255ecbc04575 +Subproject commit 60c9969b3e34b1a7c8f06e358241399b5f47bfb1