HellsBells #275
@ -97,19 +97,22 @@ public class HellsBells {
|
||||
public void startCountdown() {
|
||||
if (current != State.NONE) {
|
||||
long currentTime = System.currentTimeMillis();
|
||||
if (current != State.LAST && currentTime >= stateStart + (current.switchAfter * 1000L)) {
|
||||
if (current != State.PRE) {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§aDie Bomben fallen nun schneller.");
|
||||
}
|
||||
|
||||
|
||||
if (current != State.LAST && current != State.PRE && currentTime >= stateStart + (current.switchAfter * 1000L)) {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + "§aDie Bomben fallen nun schneller.");
|
||||
|
||||
current = current.getNext();
|
||||
stateStart = currentTime;
|
||||
}
|
||||
|
||||
int timer = current.minTime + random.nextInt(current.maxTime - current.minTime);
|
||||
|
||||
if (current == State.PRE) {
|
||||
Bukkit.broadcastMessage(FightSystem.PREFIX + (startMessages.get(random.nextInt(startMessages.size()))));
|
||||
current = current.getNext();
|
||||
YoyoNow markierte diese Unterhaltung als gelöst
Veraltet
|
||||
}
|
||||
Zeanon markierte diese Unterhaltung als gelöst
Veraltet
Lixfel
hat
Wird der State NONE wirklich benötigt? Wird der State NONE wirklich benötigt?
|
||||
|
||||
currentCountdown = new HellsBellsCountdown(timer, SWSound.BLOCK_NOTE_BASS, true);
|
||||
currentCountdown.enable();
|
||||
}
|
||||
@ -212,7 +215,7 @@ public class HellsBells {
|
||||
private enum State {
|
||||
|
||||
NONE(0, 0, -1),
|
||||
PRE(60, 80, 50),
|
||||
PRE(60, 80, 0),
|
||||
FIRST(40, 60, 5 * 60),
|
||||
SECOND(30, 40, 4 * 60),
|
||||
THIRD(20, 30, 3 * 60),
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
init() und terminate() lesen sich mir wie eine enable() und disable() eines StateDependent...