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

pull/1/head
JaTiTV 5 months ago
parent
commit
ff5c559f93
  1. 4
      CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/Objekte/Obj_Select.java

4
CommandGUI V2/src/main/java/de/jatitv/commandguiv2/Spigot/Objekte/Obj_Select.java

@ -2,6 +2,7 @@ package de.jatitv.commandguiv2.Spigot.Objekte; @@ -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 { @@ -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");

Loading…
Cancel
Save