From 20cf5b3d4fe6a50d1530390d9cd5eb43bedc4d70 Mon Sep 17 00:00:00 2001 From: 2008Choco Date: Wed, 17 Apr 2024 19:13:27 +1000 Subject: [PATCH] SPIGOT-7613: Make note of impact of mobGriefing gamerule for World#createExplosion() --- src/main/java/org/bukkit/World.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index 485f3701..d495986e 100644 --- a/src/main/java/org/bukkit/World.java +++ b/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