Meteor #324
@ -59,12 +59,12 @@ public class HellsBells {
|
|||||||
"HELLS_BELLS_SWAP_3", "HELLS_BELLS_SWAP_4");
|
"HELLS_BELLS_SWAP_3", "HELLS_BELLS_SWAP_4");
|
||||||
|
|
||||||
public void startCountdown() {
|
public void startCountdown() {
|
||||||
if (current == State.PRE) {
|
if (current == HellsBells.State.PRE || current == HellsBells.State.FIRST) {
|
||||||
String startMessage = startMessages.get(random.nextInt(startMessages.size()));
|
String startMessage = startMessages.get(random.nextInt(startMessages.size()));
|
||||||
GlobalRecorder.getInstance().system(startMessage);
|
GlobalRecorder.getInstance().system(startMessage);
|
||||||
FightSystem.getMessage().broadcast(startMessage);
|
FightSystem.getMessage().broadcast(startMessage);
|
||||||
current = current.getNext();
|
current = current.getNext();
|
||||||
} else if (current != State.LAST && currentDrops >= current.SWITCH_AFTER) {
|
} else if (current != HellsBells.State.LAST && currentDrops >= current.SWITCH_AFTER) {
|
||||||
String stateSwapMessage = stateSwapMessages.get(random.nextInt(stateSwapMessages.size()));
|
String stateSwapMessage = stateSwapMessages.get(random.nextInt(stateSwapMessages.size()));
|
||||||
GlobalRecorder.getInstance().system(stateSwapMessage);
|
GlobalRecorder.getInstance().system(stateSwapMessage);
|
||||||
FightSystem.getMessage().broadcast(stateSwapMessage);
|
FightSystem.getMessage().broadcast(stateSwapMessage);
|
||||||
|
@ -22,6 +22,7 @@ package de.steamwar.fightsystem.event;
|
|||||||
import de.steamwar.fightsystem.Config;
|
import de.steamwar.fightsystem.Config;
|
||||||
import de.steamwar.fightsystem.FightSystem;
|
import de.steamwar.fightsystem.FightSystem;
|
||||||
import de.steamwar.fightsystem.countdown.Countdown;
|
import de.steamwar.fightsystem.countdown.Countdown;
|
||||||
|
import de.steamwar.fightsystem.record.GlobalRecorder;
|
||||||
import de.steamwar.fightsystem.states.FightState;
|
import de.steamwar.fightsystem.states.FightState;
|
||||||
import de.steamwar.fightsystem.states.StateDependent;
|
import de.steamwar.fightsystem.states.StateDependent;
|
||||||
import de.steamwar.fightsystem.states.StateDependentListener;
|
import de.steamwar.fightsystem.states.StateDependentListener;
|
||||||
@ -39,6 +40,8 @@ import org.bukkit.event.entity.ProjectileHitEvent;
|
|||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@ -58,16 +61,19 @@ public class Meteor implements Listener {
|
|||||||
private final AtomicInteger amount = new AtomicInteger(0);
|
private final AtomicInteger amount = new AtomicInteger(0);
|
||||||
private BukkitTask currentDropping;
|
private BukkitTask currentDropping;
|
||||||
|
|
||||||
|
private final List<String> startMessages = Arrays.asList();
|
||||||
|
private final List<String> stateSwapMessages = Arrays.asList();
|
||||||
|
|
||||||
public void startCountdown() {
|
public void startCountdown() {
|
||||||
if (current == Meteor.State.PRE || current == Meteor.State.FIRST) {
|
if (current == Meteor.State.PRE || current == Meteor.State.FIRST) {
|
||||||
Bukkit.getOnlinePlayers().forEach(player -> {
|
String startMessage = startMessages.get(random.nextInt(startMessages.size()));
|
||||||
player.sendMessage("Starting");
|
GlobalRecorder.getInstance().system(startMessage);
|
||||||
});
|
FightSystem.getMessage().broadcast(startMessage);
|
||||||
current = current.getNext();
|
current = current.getNext();
|
||||||
} else if (current != Meteor.State.LAST && currentDrops >= current.SWITCH_AFTER) {
|
} else if (current != Meteor.State.LAST && currentDrops >= current.SWITCH_AFTER) {
|
||||||
Bukkit.getOnlinePlayers().forEach(player -> {
|
String stateSwapMessage = stateSwapMessages.get(random.nextInt(stateSwapMessages.size()));
|
||||||
player.sendMessage("Faster");
|
GlobalRecorder.getInstance().system(stateSwapMessage);
|
||||||
});
|
FightSystem.getMessage().broadcast(stateSwapMessage);
|
||||||
currentDrops = 0;
|
currentDrops = 0;
|
||||||
current = current.getNext();
|
current = current.getNext();
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren