SteamWar/FightSystem
Archiviert
13
1

+ fixing wrong team wins bug

Dieser Commit ist enthalten in:
Lixfel 2019-09-06 20:06:05 +02:00
Ursprung 0512a57568
Commit 513bcaee11
4 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -105,6 +105,8 @@ public class FightSystem extends JavaPlugin {
setAllPlayersGM(GameMode.SURVIVAL); setAllPlayersGM(GameMode.SURVIVAL);
Bukkit.broadcastMessage(PREFIX + "§aDer Kampf beginnt!"); Bukkit.broadcastMessage(PREFIX + "§aDer Kampf beginnt!");
new PreRunningCountdown();
new WinconditionAllDead(); new WinconditionAllDead();
new WinconditionCaptainDead(); new WinconditionCaptainDead();
new WinconditionWaterTechKO(); new WinconditionWaterTechKO();
@ -113,8 +115,6 @@ public class FightSystem extends JavaPlugin {
if(Config.event()){ if(Config.event()){
new EventTeamOffWincondition(); new EventTeamOffWincondition();
} }
new PreRunningCountdown();
} }
public static void setRunningState() { public static void setRunningState() {

Datei anzeigen

@ -28,6 +28,7 @@ public class EventFight {
public static EventFight get(int fightID){ public static EventFight get(int fightID){
ResultSet rs = Core.sql.select("SELECT * FROM EventFight WHERE FightID = " + fightID); ResultSet rs = Core.sql.select("SELECT * FROM EventFight WHERE FightID = " + fightID);
try{ try{
rs.next();
return new EventFight( return new EventFight(
rs.getInt("EventID"), rs.getInt("EventID"),
fightID, fightID,

Datei anzeigen

@ -15,7 +15,7 @@ public class EventTeamOffWincondition {
private void teamOff(FightTeam team){ private void teamOff(FightTeam team){
if(team.allPlayersOut()){ if(team.allPlayersOut()){
Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team " + team.getName() + " §6ist Offline!"); Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team " + team.getName() + " §6ist Offline!");
FightSystem.setSpectateState(team); FightSystem.setSpectateState(Fight.getOpposite(team));
} }
} }
} }

Datei anzeigen

@ -89,7 +89,7 @@ public class WinconditionWaterTechKO {
private static void checkEmpty(FightTeam team, Set<Location> teamWater){ private static void checkEmpty(FightTeam team, Set<Location> teamWater){
if(teamWater.isEmpty()){ if(teamWater.isEmpty()){
Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team " + team.getName() + " §6ist Tech K.O.!"); Bukkit.broadcastMessage(FightSystem.PREFIX + "§6Das Team " + team.getName() + " §6ist Tech K.O.!");
FightSystem.setSpectateState(team); FightSystem.setSpectateState(Fight.getOpposite(team));
} }
} }
} }