SteamWar/FightSystem
Archiviert
13
1

Fix Bow Recording.java

Dieser Commit ist enthalten in:
Chaoscaot 2021-04-14 12:44:40 +02:00
Ursprung 186b896bf6
Commit a364f86d1f
2 geänderte Dateien mit 10 neuen und 7 gelöschten Zeilen

Datei anzeigen

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