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] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b2a1f7e6576757d02a0369c42d4526ca3ac3d775..281fa67cb5c95e6016c7220c0ef912bbfd28cd9f 100644
index 2c13ece6592700126365a155f104d6971aab4ede..f54038554bc184ecefbd32c69c234db8aada0309 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1125,6 +1125,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1127,6 +1127,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return list;
}