Archiviert
13
0

tower-generator #6

Zusammengeführt
YoyoNow hat 16 Commits von tower-generator nach master 2023-09-23 21:29:06 +02:00 zusammengeführt
9 geänderte Dateien mit 28 neuen und 22 gelöschten Zeilen
Nur Änderungen aus Commit a1acde76fd werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -58,6 +58,7 @@ public class WorldConfig {
public static final TowerGeneratorConfig TOWER_GENERATOR_CONFIG; public static final TowerGeneratorConfig TOWER_GENERATOR_CONFIG;
public static final List<WinCondition> WINCONDITIONS = new ArrayList<>(); public static final List<WinCondition> WINCONDITIONS = new ArrayList<>();
static { static {
WINCONDITIONS.add(new LastRemainingWincondition()); WINCONDITIONS.add(new LastRemainingWincondition());
WINCONDITIONS.add(new LastOutsideWincondition()); WINCONDITIONS.add(new LastOutsideWincondition());

Datei anzeigen

@ -38,9 +38,13 @@ public abstract class Countdown extends GameStateToggleListener {
super(enabledStates); super(enabledStates);
} }
int defaultTime() {return 0;} int defaultTime() {
return 0;
}
void timerEnd() {} void timerEnd() {}
boolean timerShouldCancel() {return true;} boolean timerShouldCancel() {
return true;
}
void run() {} void run() {}
void timerStart() {} void timerStart() {}
void timerReset() {} void timerReset() {}

Datei anzeigen

@ -32,7 +32,7 @@ public class EndCountdown extends Countdown {
private final LobbyCountdown lobbyCountdown; private final LobbyCountdown lobbyCountdown;
private static boolean RESETS = Objects.requireNonNull(Bukkit.getWorlds().get(0).getWorldFolder().list((dir, name) -> name.equals("backup"))).length > 0; private static final boolean RESETS = Objects.requireNonNull(Bukkit.getWorlds().get(0).getWorldFolder().list((dir, name) -> name.equals("backup"))).length > 0;
public EndCountdown(LobbyCountdown lobbyCountdown) { public EndCountdown(LobbyCountdown lobbyCountdown) {
super(EnumSet.of(GameStates.ENDING)); super(EnumSet.of(GameStates.ENDING));

Datei anzeigen

@ -31,8 +31,8 @@ public class TowerGenerator {
private static final Random random = new Random(); private static final Random random = new Random();
private final WorldConfig.TowerGeneratorConfig config; private final WorldConfig.TowerGeneratorConfig config;
private List<SchematicNode> allSchematics; private final List<SchematicNode> allSchematics;
private Clipboard roof; private final Clipboard roof;
@Getter @Getter
private int height; private int height;

Datei anzeigen

@ -48,7 +48,7 @@ import java.util.*;
public class IngameListener extends GameStateBukkitListener { public class IngameListener extends GameStateBukkitListener {
private int time = 0; private int time = 0;
private Map<Integer, List<Block>> blocksToMelt = new HashMap<>(); private final Map<Integer, List<Block>> blocksToMelt = new HashMap<>();
private BukkitRunnable runnable; private BukkitRunnable runnable;
public IngameListener() { public IngameListener() {

Datei anzeigen

@ -34,6 +34,7 @@ public abstract class GameStateToggleListener extends GameStateListener {
} }
public abstract void enable(); public abstract void enable();
public abstract void disable(); public abstract void disable();
@Override @Override