Add API for explosions to damage the explosion cause (#11180)

This intends to give plugin developers more control over explosions created using the World#createExplosion method, specifically by adding the option for explosions to damage the explosion cause (not the default behavior, and previously impossible to do, as far as I know). This is done by overloading existing methods with an extra `excludeSourceFromDamage` parameter.

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
This commit is contained in:
Esoteric Enderman 2024-09-28 20:32:56 +01:00 committed by GitHub
parent 7b03141498
commit 355b1cbaf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 233 additions and 122 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] More World API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 216995288f6b8b407ef8240411b5ed4713379a7a..d3fc033aba36c5fd99846e9200ed0071fddd6045 100644
index e4471e86e1b0993425087d8331e7c3d9896b3908..ce1f3ffbab6a8dc8395e3a5b74a7874bb6b38aa9 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -3795,6 +3795,72 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -3811,6 +3811,72 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);