SteamWar/FightSystem
Archiviert
13
1

WIP config refactoring #2

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2021-11-09 10:28:07 +01:00
Ursprung e79bce8d6d
Commit 673658fab0
2 geänderte Dateien mit 25 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -1,3 +1,23 @@
Server:
# Base server folder
Folder: ""
# Server java archive
ServerJar: ""
# Available arenas
Maps: []
# Names to address the game mode in the chat interface
ChatNames: []
# If the game mode should be marked as a historic game mode
Historic: false # defaults to false if missing
# If ranked matches should be available for the game mode
Ranked: false # defaults to false if missing
# The questions that have to be answered to accept the schematic
CheckQuestions: [] # Disables check schem type if missing
# The available schematic ranks
Ranks: [] # Disables ranks for this schematic type if missing
Times:
# Time in seconds the server stops after starting if nobody joins
NoPlayersOnlineDuration: 30 # defaults to 30 if missing
@ -28,10 +48,10 @@ Schematic:
x: 0
y: 0
z: 0
# If the rank system for the schematics should be enabled
RanksEnabled: false # defaults to false if missing
# The schematic type that can be chosen in this arena
SchematicType: normal # defaults to normal if missing
Type: Normal # defaults to Normal if missing
# Shortcut of the schematic type
Shortcut: "" # defaults to "" if missing
# If the schematics should be rotated during pasting
Rotate: true # defaults to true if missing
# If the schematics should be pasted aligned to the borders instead of centered
@ -179,4 +199,4 @@ Techhider:
# SpawnOffset:
# x: 0 # defaults to 0 if missing
# y: 0 # defaults to Schematic.Size.y if missing
# z: 0 # defaults to 0 if missing
# z: 0 # defaults to 0 if missing

Datei anzeigen

@ -168,7 +168,7 @@ public class Config {
int schemsizeX = config.getInt("Schematic.Size.x");
int schemsizeY = config.getInt("Schematic.Size.y");
int schemsizeZ = config.getInt("Schematic.Size.z");
RanksEnabled = config.getBoolean("Schematic.RanksEnabled", false);
RanksEnabled = !config.getStringList("Ranks").isEmpty();
SchematicType = de.steamwar.sql.SchematicType.fromDB(Objects.requireNonNull(config.getString("Schematic.SchematicType", "normal")));
IgnorePublicOnly = config.getBoolean("Schematic.IgnorePublicOnly", false);
boolean rotate = config.getBoolean("Schematic.Rotate", true);