Fix non lower case SchematicType fromDB lookup
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Fix RankedEvent not being considered für ignore publics only Fix using index 0 instead of i for creating of gui Fix config.yml missing comment
Dieser Commit ist enthalten in:
Ursprung
8d77f4dcf4
Commit
c0665b1868
@ -61,6 +61,7 @@ Schematic:
|
||||
z: 0
|
||||
# The schematic type that can be chosen in this arena
|
||||
Type: Normal # defaults to Normal if missing
|
||||
# The schematic types that are also allowed to be chosen in this arena
|
||||
SubTypes: [] # defaults to empty List
|
||||
# Shortcut of the schematic type
|
||||
Shortcut: "" # defaults to "" if missing
|
||||
|
@ -178,8 +178,8 @@ public class Config {
|
||||
int schemsizeY = config.getInt("Schematic.Size.y");
|
||||
int schemsizeZ = config.getInt("Schematic.Size.z");
|
||||
RanksEnabled = !config.getStringList("Ranks").isEmpty();
|
||||
SchematicType = de.steamwar.sql.SchematicType.fromDB(Objects.requireNonNull(config.getString("Schematic.Type", "normal")));
|
||||
SubTypes = config.getStringList("Schematic.SubTypes").stream().map(de.steamwar.sql.SchematicType::fromDB).collect(Collectors.toList());
|
||||
SchematicType = de.steamwar.sql.SchematicType.fromDB(Objects.requireNonNull(config.getString("Schematic.Type", "normal").toLowerCase()));
|
||||
SubTypes = config.getStringList("Schematic.SubTypes").stream().map(String::toLowerCase).map(de.steamwar.sql.SchematicType::fromDB).collect(Collectors.toList());
|
||||
IgnorePublicOnly = config.getBoolean("Schematic.IgnorePublicOnly", false);
|
||||
boolean rotate = config.getBoolean("Schematic.Rotate", true);
|
||||
PasteAligned = config.getBoolean("Schematic.PasteAligned", false);
|
||||
|
@ -172,7 +172,7 @@ public class GUI {
|
||||
SWInventory inv = new SWInventory(p, invSize, msg.parse("SCHEM_TITLE", p, Config.GameName));
|
||||
setupSchemTypeRow(p, inv, Config.SchematicType, 0);
|
||||
for (int i = 0; i < Config.SubTypes.size(); i++) {
|
||||
setupSchemTypeRow(p, inv, Config.SubTypes.get(0), i + 1);
|
||||
setupSchemTypeRow(p, inv, Config.SubTypes.get(i), i + 1);
|
||||
}
|
||||
inv.setCallback(-999, (ClickType click) -> p.closeInventory());
|
||||
inv.open();
|
||||
|
@ -143,7 +143,7 @@ public class Fight {
|
||||
if (Config.OnlyPublicSchematics) {
|
||||
return true;
|
||||
}
|
||||
if (Config.IgnorePublicOnly) {
|
||||
if (Config.IgnorePublicOnly || ArenaMode.RankedEvent.contains(Config.mode)) {
|
||||
return false;
|
||||
}
|
||||
return redTeam.isPublicsOnly() || blueTeam.isPublicsOnly();
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren