SteamWar/FightSystem
Archiviert
13
1

Add Bow Damge and Fire #261

Manuell gemergt
Lixfel hat 14 Commits von record_extension nach master 2021-04-23 19:52:27 +02:00 zusammengeführt
2 geänderte Dateien mit 10 neuen und 7 gelöschten Zeilen
Nur Änderungen aus Commit a364f86d1f werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -384,6 +384,6 @@ public class Config {
return ArenaMode.Test.contains(mode); return ArenaMode.Test.contains(mode);
} }
public static boolean recording(){ public static boolean recording(){
return mode == ArenaMode.EVENT; return true;//mode == ArenaMode.EVENT;
} }
} }

Datei anzeigen

@ -101,7 +101,7 @@ public class Recording implements Listener {
despawnTNT(); despawnTNT();
} }
}.register(); }.register();
new StateDependent(Config.recording(), FightState.All) { new StateDependent(Config.recording(), FightState.Ingame) {
@Override @Override
public void enable() { public void enable() {
ProtocolLibrary.getProtocolManager().addPacketListener(BOW_PACKET_PROCESSOR); ProtocolLibrary.getProtocolManager().addPacketListener(BOW_PACKET_PROCESSOR);
@ -157,15 +157,14 @@ 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)
RecordSystem.setOnFire(e.getEntity(), false);
Player p = (Player) e.getEntity(); Player p = (Player) e.getEntity();
if(isNotSent(p)) if(isNotSent(p))
return; return;
RecordSystem.damageAnimation(p); RecordSystem.damageAnimation(p);
if(e.getCause() == EntityDamageEvent.DamageCause.FIRE_TICK || e.getCause() == EntityDamageEvent.DamageCause.FIRE)
RecordSystem.setOnFire(p, false);
} }
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@ -173,7 +172,11 @@ public class Recording implements Listener {
if(e.getEntityType() != EntityType.PLAYER) if(e.getEntityType() != EntityType.PLAYER)
return; return;
RecordSystem.setOnFire(e.getEntity(), false); Player p = (Player) e.getEntity();
if(isNotSent(p))
return;
RecordSystem.setOnFire(p, false);
} }
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)