12
1

Fix Bow Recording.java

Dieser Commit ist enthalten in:
Chaoscaot 2021-04-13 21:30:22 +02:00
Ursprung d7a9ce65d4
Commit 186b896bf6

Datei anzeigen

@ -111,7 +111,7 @@ public class Recording implements Listener {
public void disable() { public void disable() {
ProtocolLibrary.getProtocolManager().removePacketListener(BOW_PACKET_PROCESSOR); ProtocolLibrary.getProtocolManager().removePacketListener(BOW_PACKET_PROCESSOR);
} }
}; }.register();
} }
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@ -157,7 +157,7 @@ public class Recording implements Listener {
if(e.getEntityType() != EntityType.PLAYER) if(e.getEntityType() != EntityType.PLAYER)
return; 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); RecordSystem.setOnFire(e.getEntity(), false);
@ -168,6 +168,14 @@ public class Recording implements Listener {
RecordSystem.damageAnimation(p); 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) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onTNTSpawn(EntitySpawnEvent e){ public void onTNTSpawn(EntitySpawnEvent e){
//TODO: Falling block //TODO: Falling block