SteamWar/FightSystem
Archiviert
13
1

RecordSystem (Beta) #199

Manuell gemergt
Lixfel hat 40 Commits von recordSystem nach master 2020-11-01 20:11:45 +01:00 zusammengeführt
Nur Änderungen aus Commit 20f14670df werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -29,6 +29,7 @@ import de.steamwar.fightsystem.states.FightState;
import org.bukkit.*;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.TNTPrimed;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockPhysicsEvent;
@ -194,6 +195,7 @@ public class EventRecordListener extends BasicListener {
}else if(state == FightState.SPECTATE){
despawnTeam(Fight.getRedTeam());
despawnTeam(Fight.getBlueTeam());
despawnTNT();
}
}
@ -228,6 +230,11 @@ public class EventRecordListener extends BasicListener {
}
}
private void despawnTNT(){
for(TNTPrimed tnt : Bukkit.getWorlds().get(0).getEntitiesByClass(TNTPrimed.class))
RecordSystem.entityDespawns(tnt);
}
private boolean isNotSent(Player p){
FightPlayer fp = Fight.getFightPlayer(p);
return fp == null || !fp.isLiving() || FightSystem.getFightState() == FightState.SPECTATE;