ToolConfigManager.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. package com.gmail.nossr50.dumpster.mods;
  3. public class ToolConfigManager {
  4. //TODO: Commented out until modded servers appear again
  5. */
  6. /*public ToolConfigManager(mcMMO plugin) {
  7. Pattern middlePattern = Pattern.compile("tools\\.(?:.+)\\.yml");
  8. Pattern startPattern = Pattern.compile("(?:.+)\\.tools\\.yml");
  9. File dataFolder = new File(mcMMO.getModDirectory());
  10. File vanilla = new File(dataFolder, "tools.default.yml");
  11. ModManager modManager = mcMMO.getModManager();
  12. if (!vanilla.exists()) {
  13. plugin.saveResource(vanilla.getParentFile().getName() + File.separator + "tools.default.yml", false);
  14. }
  15. for (String fileName : dataFolder.list()) {
  16. if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
  17. continue;
  18. }
  19. File file = new File(dataFolder, fileName);
  20. if (file.isDirectory()) {
  21. continue;
  22. }
  23. modManager.registerCustomTools(new CustomToolConfig(fileName));
  24. }
  25. }*//*
  26. }
  27. */