Commented files (e.g. gui.ymlX) are no longer recognized as gui.

This commit is contained in:
JaTiTV 2021-12-29 06:44:04 +01:00
parent 02cf238cd2
commit ff5c559f93

View File

@ -2,6 +2,7 @@ package de.jatitv.commandguiv2.Spigot.Objekte;
import de.jatitv.commandguiv2.Spigot.Main;
import de.jatitv.commandguiv2.Spigot.cmdManagement.CmdExecuter_GUI;
import net.t2code.lib.Spigot.Lib.messages.send;
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
import org.bukkit.configuration.file.YamlConfiguration;
@ -17,10 +18,9 @@ public class Obj_Select {
File[] fileArray = f.listFiles();
for (File config_gui : fileArray) {
Main.allAliases.add(config_gui.getName().replace(".yml", ""));
String sub = config_gui.getName().substring(config_gui.getName().length() - 4);
if (sub.equals(".yml")) {
Main.allAliases.add(config_gui.getName().replace(".yml", ""));
YamlConfiguration yamlConfiguration_gui = YamlConfiguration.loadConfiguration(config_gui);
Boolean GUI_Enable = yamlConfiguration_gui.getBoolean("GUI.Enable");