mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Fix phantom flames from setting players on fire if a plugin cancelled the original damage
This commit is contained in:
@@ -5552,7 +5552,7 @@ index 0000000000000000000000000000000000000000..fda24d4ecff91cc28d2a7a45fbb55ea7
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java
|
diff --git a/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..57b59a12f609fda0787d49575724762362ce12af
|
index 0000000000000000000000000000000000000000..b196bee2ea6e67897b367d2be1800f16a89a6167
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java
|
+++ b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java
|
||||||
@@ -0,0 +1,114 @@
|
@@ -0,0 +1,114 @@
|
||||||
@@ -5650,8 +5650,8 @@ index 0000000000000000000000000000000000000000..57b59a12f609fda0787d495757247623
|
|||||||
+ if (shooter instanceof LivingEntity) {
|
+ if (shooter instanceof LivingEntity) {
|
||||||
+ Entity target = entityHitResult.getEntity();
|
+ Entity target = entityHitResult.getEntity();
|
||||||
+ if (canGrief || (target instanceof LivingEntity && !(target instanceof ArmorStand))) {
|
+ if (canGrief || (target instanceof LivingEntity && !(target instanceof ArmorStand))) {
|
||||||
+ target.hurt(DamageSource.indirectMobAttack(this, (LivingEntity) shooter).setProjectile(), level.purpurConfig.phantomFlameDamage);
|
+ boolean hurt = target.hurt(DamageSource.indirectMobAttack(this, (LivingEntity) shooter).setProjectile(), level.purpurConfig.phantomFlameDamage);
|
||||||
+ if (level.purpurConfig.phantomFlameFireTime > 0) {
|
+ if (hurt && level.purpurConfig.phantomFlameFireTime > 0) {
|
||||||
+ target.setSecondsOnFire(level.purpurConfig.phantomFlameFireTime);
|
+ target.setSecondsOnFire(level.purpurConfig.phantomFlameFireTime);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|||||||
Reference in New Issue
Block a user