diff --git a/patches/api/Add-StructuresLocateEvent.patch b/patches/api/Add-StructuresLocateEvent.patch index 6a91899558..cb68a3c077 100644 --- a/patches/api/Add-StructuresLocateEvent.patch +++ b/patches/api/Add-StructuresLocateEvent.patch @@ -188,6 +188,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import org.bukkit.event.HandlerList; +import org.bukkit.event.world.WorldEvent; +import org.bukkit.generator.structure.Structure; ++import org.bukkit.generator.structure.StructureType; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.UnmodifiableView; @@ -201,7 +202,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + *
  • An Explorer/Treasure Map is activated.
  • + *
  • A dolphin swims to a treasure location.
  • + *
  • A trade is done with a villager for a map.
  • -+ *
  • {@link World#locateNearestStructure(Location, org.bukkit.StructureType, int, boolean)} is invoked.
  • ++ *
  • {@link World#locateNearestStructure(Location, StructureType, int, boolean)} is invoked.
  • ++ *
  • {@link World#locateNearestStructure(Location, Structure, int, boolean)} is invoked.
  • + * + */ +public class StructuresLocateEvent extends WorldEvent implements Cancellable { diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index f02c9f8526..9162bc3a91 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -3229,7 +3229,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start + private final java.util.Locale adventure$locale; + /** -+ * @see Player#getLocale() ++ * @see Player#locale() + * + * @return the player's new locale + */ @@ -3556,6 +3556,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java +++ b/src/main/java/org/bukkit/event/server/BroadcastMessageEvent.java @@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull; + + /** + * Event triggered for server broadcast messages such as from +- * {@link org.bukkit.Server#broadcast(String, String)}. ++ * {@link org.bukkit.Server#broadcast(net.kyori.adventure.text.Component)} (String, String)}. + * +- * This event behaves similarly to {@link AsyncPlayerChatEvent} in that it ++ * This event behaves similarly to {@link io.papermc.paper.event.player.AsyncChatEvent} in that it + * should be async if fired from an async thread. Please see that event for + * further information. + */ public class BroadcastMessageEvent extends ServerEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); diff --git a/patches/api/Create-HoverEvent-from-ItemStack-Entity.patch b/patches/api/Create-HoverEvent-from-ItemStack-Entity.patch index 52beec5c41..39e6e182e1 100644 --- a/patches/api/Create-HoverEvent-from-ItemStack-Entity.patch +++ b/patches/api/Create-HoverEvent-from-ItemStack-Entity.patch @@ -16,10 +16,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + /** + * Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack for displaying. + * -+ * @param itemStack ++ * @param itemStack the itemstack + * @return the {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack ++ * @deprecated use {@link ItemStack#asHoverEvent()} + */ + @NotNull ++ @Deprecated // Paper + net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull ItemStack itemStack); + + /** diff --git a/patches/api/Fix-upstream-javadocs.patch b/patches/api/Fix-upstream-javadocs.patch index 10e40c9125..3e8517a403 100644 --- a/patches/api/Fix-upstream-javadocs.patch +++ b/patches/api/Fix-upstream-javadocs.patch @@ -243,6 +243,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + void setColor(@org.bukkit.UndefinedNullability("not supported") org.bukkit.DyeColor color); +// Paper end +} +diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/block/Block.java ++++ b/src/main/java/org/bukkit/block/Block.java +@@ -0,0 +0,0 @@ public interface Block extends Metadatable, Translatable { + * Gets the temperature of this block. + *

    + * If the raw biome temperature without adjusting for height effects is +- * required then please use {@link World#getTemperature(int, int)}. ++ * required then please use {@link World#getTemperature(int, int, int)}. + * + * @return Temperature of this block + */ diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/block/data/BlockData.java @@ -734,6 +747,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @NotNull @Override public HandlerList getHandlers() { +diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java ++++ b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java +@@ -0,0 +0,0 @@ import org.bukkit.event.HandlerList; + import org.jetbrains.annotations.NotNull; + + /** +- * Called when a player takes action on a resource pack request sent via +- * {@link Player#setResourcePack(java.lang.String)}. ++ * Called when a player takes action on a resource pack request. ++ * @see Player#setResourcePack(String, String) ++ * @see Player#setResourcePack(String, String, boolean) + */ + public class PlayerResourcePackStatusEvent extends PlayerEvent { + diff --git a/src/main/java/org/bukkit/generator/ChunkGenerator.java b/src/main/java/org/bukkit/generator/ChunkGenerator.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/generator/ChunkGenerator.java diff --git a/patches/api/Paper-Plugins.patch b/patches/api/Paper-Plugins.patch index 8ff6a0d08b..404ad7c49c 100644 --- a/patches/api/Paper-Plugins.patch +++ b/patches/api/Paper-Plugins.patch @@ -1362,6 +1362,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 register("bukkit", new TimingsCommand("timings")); } +diff --git a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/command/defaults/PluginsCommand.java ++++ b/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +@@ -0,0 +0,0 @@ import org.bukkit.command.CommandSender; + import org.bukkit.plugin.Plugin; + import org.jetbrains.annotations.NotNull; + ++@Deprecated(forRemoval = true) // Paper + public class PluginsCommand extends BukkitCommand { + public PluginsCommand(@NotNull String name) { + super(name); diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/plugin/Plugin.java @@ -1908,7 +1920,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return description; } -+ @Nullable ++ @NotNull + public final io.papermc.paper.plugin.configuration.PluginMeta getPluginMeta() { + return this.pluginMeta; + } diff --git a/patches/api/Warn-on-strange-EventHandler-return-types.patch b/patches/api/Warn-on-strange-EventHandler-return-types.patch index 317f07ceb1..abef4359c1 100644 --- a/patches/api/Warn-on-strange-EventHandler-return-types.patch +++ b/patches/api/Warn-on-strange-EventHandler-return-types.patch @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + final org.bukkit.plugin.java.JavaPlugin plugin = org.bukkit.plugin.java.JavaPlugin.getProvidingPlugin(m.getDeclaringClass()); + org.bukkit.Bukkit.getLogger().warning("@EventHandler method " + m.getDeclaringClass().getName() + (Modifier.isStatic(m.getModifiers()) ? '.' : '#') + m.getName() + + " returns non-void type " + m.getReturnType().getName() + ". This is unsupported behavior and will no longer work in a future version of Paper." -+ + " This should be reported to the developers of " + plugin.getDescription().getFullName() + " (" + String.join(",", plugin.getDescription().getAuthors()) + ')'); ++ + " This should be reported to the developers of " + plugin.getPluginMeta().getDisplayName() + " (" + String.join(",", plugin.getPluginMeta().getAuthors()) + ')'); + } if (Modifier.isStatic(m.getModifiers())) { return new StaticMethodHandleEventExecutor(eventClass, m);