From 186b896bf6153f9bf3e4798acefc9d9d789b2ddc Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 13 Apr 2021 21:30:22 +0200 Subject: [PATCH] Fix Bow Recording.java --- .../de/steamwar/fightsystem/listener/Recording.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/Recording.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/Recording.java index 4acde52..01ec8f0 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/Recording.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/Recording.java @@ -111,7 +111,7 @@ public class Recording implements Listener { public void disable() { ProtocolLibrary.getProtocolManager().removePacketListener(BOW_PACKET_PROCESSOR); } - }; + }.register(); } @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @@ -157,7 +157,7 @@ public class Recording implements Listener { if(e.getEntityType() != EntityType.PLAYER) return; - if(e.getCause() == EntityDamageEvent.DamageCause.FIRE_TICK || e.getCause() == EntityDamageEvent.DamageCause.FIRE ||e.getEntity().getFireTicks() > 0) + if(e.getCause() == EntityDamageEvent.DamageCause.FIRE_TICK || e.getCause() == EntityDamageEvent.DamageCause.FIRE) RecordSystem.setOnFire(e.getEntity(), false); @@ -168,6 +168,14 @@ public class Recording implements Listener { RecordSystem.damageAnimation(p); } + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) + public void onEntityCombust(EntityCombustEvent e) { + if(e.getEntityType() != EntityType.PLAYER) + return; + + RecordSystem.setOnFire(e.getEntity(), false); + } + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onTNTSpawn(EntitySpawnEvent e){ //TODO: Falling block