SteamWar/BauSystem2.0
Archiviert
12
0

Update TechHiderCommand
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-07-29 23:30:22 +02:00
Ursprung 102bbea11e
Commit c128a3594c
2 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -60,6 +60,9 @@ public class TechHiderCommand extends SWCommand implements Listener {
Optional<TechHider> techHider = techHiders.computeIfAbsent(region, rg -> { Optional<TechHider> techHider = techHiders.computeIfAbsent(region, rg -> {
File file = rg.gameModeConfig(); File file = rg.gameModeConfig();
if (file == null) {
return Optional.empty();
}
FileConfiguration config = YamlConfiguration.loadConfiguration(file); FileConfiguration config = YamlConfiguration.loadConfiguration(file);
if (!config.getBoolean("Techhider.Active", false)) { if (!config.getBoolean("Techhider.Active", false)) {

Datei anzeigen

@ -591,7 +591,7 @@ public class Region {
public File gameModeConfig() { public File gameModeConfig() {
File baseFile = new File(BauSystem.getInstance().getDataFolder().getParentFile(), "FightSystem"); File baseFile = new File(BauSystem.getInstance().getDataFolder().getParentFile(), "FightSystem");
for (int version = Core.getVersion(); version > 15; version--) { for (int version = Core.getVersion(); version >= 15; version--) {
File specific = new File(baseFile, getDisplayName() + version + ".yml"); File specific = new File(baseFile, getDisplayName() + version + ".yml");
if (specific.exists()) return specific; if (specific.exists()) return specific;
} }