From c71ea48a4942da8109fede26aa1c4b7e24d31bc2 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 17 Apr 2024 19:13:27 +1000 Subject: [PATCH] SPIGOT-7613: Make note of impact of mobGriefing gamerule for World#createExplosion() By: 2008Choco --- paper-api/src/main/java/org/bukkit/World.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index 485f37016..d495986e7 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -1089,6 +1089,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient /** * Creates explosion at given coordinates with given power and optionally * setting blocks on fire or breaking blocks. + *

+ * Note that if a non-null {@code source} Entity is provided and {@code + * breakBlocks} is {@code true}, the value of {@code breakBlocks} will be + * ignored if {@link GameRule#MOB_GRIEFING} is {@code false} in the world + * in which the explosion occurs. In other words, the mob griefing gamerule + * will take priority over {@code breakBlocks} if explosions are not allowed. * * @param x X coordinate * @param y Y coordinate @@ -1136,6 +1142,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient /** * Creates explosion at given coordinates with given power and optionally * setting blocks on fire or breaking blocks. + *

+ * Note that if a non-null {@code source} Entity is provided and {@code + * breakBlocks} is {@code true}, the value of {@code breakBlocks} will be + * ignored if {@link GameRule#MOB_GRIEFING} is {@code false} in the world + * in which the explosion occurs. In other words, the mob griefing gamerule + * will take priority over {@code breakBlocks} if explosions are not allowed. * * @param loc Location to blow up * @param power The power of explosion, where 4F is TNT