Skip to content

Commit

Permalink
Fix phantom flames from setting players on fire if a plugin cancelled…
Browse files Browse the repository at this point in the history
… the original damage
  • Loading branch information
BillyGalbreath committed Aug 1, 2021
1 parent b7d424b commit a2340e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions patches/server/0006-Ridables.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
new file mode 100644
index 0000000000000000000000000000000000000000..57b59a12f609fda0787d49575724762362ce12af
index 0000000000000000000000000000000000000000..b196bee2ea6e67897b367d2be1800f16a89a6167
--- /dev/null
+++ b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java
@@ -0,0 +1,114 @@
Expand Down Expand Up @@ -5650,8 +5650,8 @@ index 0000000000000000000000000000000000000000..57b59a12f609fda0787d495757247623
+ if (shooter instanceof LivingEntity) {
+ Entity target = entityHitResult.getEntity();
+ if (canGrief || (target instanceof LivingEntity && !(target instanceof ArmorStand))) {
+ target.hurt(DamageSource.indirectMobAttack(this, (LivingEntity) shooter).setProjectile(), level.purpurConfig.phantomFlameDamage);
+ if (level.purpurConfig.phantomFlameFireTime > 0) {
+ boolean hurt = target.hurt(DamageSource.indirectMobAttack(this, (LivingEntity) shooter).setProjectile(), level.purpurConfig.phantomFlameDamage);
+ if (hurt && level.purpurConfig.phantomFlameFireTime > 0) {
+ target.setSecondsOnFire(level.purpurConfig.phantomFlameFireTime);
+ }
+ }
Expand Down

0 comments on commit a2340e3

Please sign in to comment.