From d676979ea0f28cedac092523d4e847a35d8b4c8c Mon Sep 17 00:00:00 2001 From: Rowan Date: Sat, 27 Jan 2024 20:42:46 +0100 Subject: [PATCH] [ci skip] Fix incorrect documentation for BlockDropItemEvent (#10175) Co-authored-by: Bjarne Koll --- patches/api/Fix-upstream-javadocs.patch | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/patches/api/Fix-upstream-javadocs.patch b/patches/api/Fix-upstream-javadocs.patch index cd79fb8e47..ee6cc23afc 100644 --- a/patches/api/Fix-upstream-javadocs.patch +++ b/patches/api/Fix-upstream-javadocs.patch @@ -572,6 +572,33 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * wool items, and shears. */ SHEPHERD, +diff --git a/src/main/java/org/bukkit/event/block/BlockDropItemEvent.java b/src/main/java/org/bukkit/event/block/BlockDropItemEvent.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/event/block/BlockDropItemEvent.java ++++ b/src/main/java/org/bukkit/event/block/BlockDropItemEvent.java +@@ -0,0 +0,0 @@ import org.bukkit.event.HandlerList; + import org.jetbrains.annotations.NotNull; + + /** +- * Called if a block broken by a player drops an item. ++ * Called after a block is broken by a player and potential drops are computed, even if said blocks loot table ++ * does not define any drops at the point the event is constructed. + * + * If the block break is cancelled, this event won't be called. + * +- * If isDropItems in BlockBreakEvent is set to false, this event won't be ++ * If isDropItems in {@link org.bukkit.event.block.BlockBreakEvent} is set to false, this event won't be + * called. + * ++ * If a block is broken and isDropItems is set to true, this event will be called even if the block does ++ * not drop any items, for example glass broken by hand. In this case, #getItems() will be empty. ++ * + * This event will also be called if the player breaks a multi block structure, +- * for example a torch on top of a stone. Both items will have an event call. ++ * for example a torch on top of a stone. Both items will be included in the #getItems() list. + * + * The Block is already broken as this event is called, so #getBlock() will be + * AIR in most cases. Use #getBlockState() for more Information about the broken diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java