SteamWar/MissileWars
Archiviert
13
0

Update1.0 #11

Geschlossen
YoyoNow möchte 11 Commits von Update1.0 nach master mergen
Nur Änderungen aus Commit 411d602a99 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -36,7 +36,6 @@ public class MissileWars extends JavaPlugin {
private static MWTeam redTeam; //red has South side -> spawns missles towards north private static MWTeam redTeam; //red has South side -> spawns missles towards north
private static MWTeam blueTeam; private static MWTeam blueTeam;
private static FightState fightState; private static FightState fightState;
private static long startTime; //timestamp when the fight starts
/** /**
* create teams, ect * create teams, ect
@ -45,7 +44,6 @@ public class MissileWars extends JavaPlugin {
public void onLoad() { public void onLoad() {
plugin = this; plugin = this;
fightState = FightState.WAITING; fightState = FightState.WAITING;
startTime = -1;
} }
@Override @Override
@ -87,10 +85,7 @@ public class MissileWars extends JavaPlugin {
if (fightState != FightState.WAITING) // anti dual-call if (fightState != FightState.WAITING) // anti dual-call
return; return;
fightState = FightState.FIGHTING; fightState = FightState.FIGHTING;
startTime = System.currentTimeMillis();
StateDependent.setupState(fightState); StateDependent.setupState(fightState);
startTime = System.currentTimeMillis();
} }
/** /**
@ -144,11 +139,4 @@ public class MissileWars extends JavaPlugin {
return null; return null;
} }
/**
* @return seconds since start
*/
public static int getFightTime() {
if (startTime == -1) return -1;
return (int)((System.currentTimeMillis() - startTime) / 1000);
}
} }