diff --git a/Changelog.txt b/Changelog.txt index 44b16764c..a978ad440 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -20,7 +20,7 @@ Version 1.4.08-dev + Added new experience bonus perk 'mcmmo.perks.xp.10percentboost.' multiplies incoming XP by 1.1 + Added new experience bonus perk 'mcmmo.perks.xp.customboost.' multiplies incoming XP by the boost amount defined in the experience config + Added Ender Dragon, Wither, and Witch to combat experience multipliers - they do not give XP by default - + Added support for multiple mod config files, naming is done in the same style as repair.*.yml (blocks.*.yml, tools.*.yml, entities.*.yml, armor.*.yml) + + Added support for multiple mod config files, naming can be done as either armor..yml or .armor.yml = Fixed bug where LeafBlower permissions were ignored = Fixed bug with toggle commands not properly displaying the success message. = Fixed IllegalArgumentException caused by an empty Fishing treasure category diff --git a/src/main/java/com/gmail/nossr50/config/mods/ArmorConfigManager.java b/src/main/java/com/gmail/nossr50/config/mods/ArmorConfigManager.java index b3a783366..9a89feac2 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/ArmorConfigManager.java +++ b/src/main/java/com/gmail/nossr50/config/mods/ArmorConfigManager.java @@ -8,7 +8,8 @@ import java.util.regex.Pattern; public class ArmorConfigManager { public ArmorConfigManager(mcMMO plugin) { - Pattern pattern = Pattern.compile("armor\\.(?:.+)\\.yml"); + Pattern middlePattern = Pattern.compile("armor\\.(?:.+)\\.yml"); + Pattern startPattern = Pattern.compile("(?:.+)\\.armor\\.yml"); File dataFolder = new File(mcMMO.getModDirectory()); File vanilla = new File(dataFolder, "armor.default.yml"); ModManager modManager = mcMMO.getModManager(); @@ -18,7 +19,7 @@ public class ArmorConfigManager { } for (String fileName : dataFolder.list()) { - if (!pattern.matcher(fileName).matches()) { + if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) { continue; } diff --git a/src/main/java/com/gmail/nossr50/config/mods/BlockConfigManager.java b/src/main/java/com/gmail/nossr50/config/mods/BlockConfigManager.java index 56dbd4c07..cc03629c6 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/BlockConfigManager.java +++ b/src/main/java/com/gmail/nossr50/config/mods/BlockConfigManager.java @@ -8,7 +8,8 @@ import java.util.regex.Pattern; public class BlockConfigManager { public BlockConfigManager(mcMMO plugin) { - Pattern pattern = Pattern.compile("blocks\\.(?:.+)\\.yml"); + Pattern middlePattern = Pattern.compile("blocks\\.(?:.+)\\.yml"); + Pattern startPattern = Pattern.compile("(?:.+)\\.blocks\\.yml"); File dataFolder = new File(mcMMO.getModDirectory()); File vanilla = new File(dataFolder, "blocks.default.yml"); ModManager modManager = mcMMO.getModManager(); @@ -18,7 +19,7 @@ public class BlockConfigManager { } for (String fileName : dataFolder.list()) { - if (!pattern.matcher(fileName).matches()) { + if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) { continue; } diff --git a/src/main/java/com/gmail/nossr50/config/mods/EntityConfigManager.java b/src/main/java/com/gmail/nossr50/config/mods/EntityConfigManager.java index e97c4ea89..5c48ee0f7 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/EntityConfigManager.java +++ b/src/main/java/com/gmail/nossr50/config/mods/EntityConfigManager.java @@ -8,7 +8,8 @@ import java.util.regex.Pattern; public class EntityConfigManager { public EntityConfigManager(mcMMO plugin) { - Pattern pattern = Pattern.compile("entities\\.(?:.+)\\.yml"); + Pattern middlePattern = Pattern.compile("entities\\.(?:.+)\\.yml"); + Pattern startPattern = Pattern.compile("(?:.+)\\.entities\\.yml"); File dataFolder = new File(mcMMO.getModDirectory()); File vanilla = new File(dataFolder, "entities.default.yml"); ModManager modManager = mcMMO.getModManager(); @@ -18,7 +19,7 @@ public class EntityConfigManager { } for (String fileName : dataFolder.list()) { - if (!pattern.matcher(fileName).matches()) { + if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) { continue; } diff --git a/src/main/java/com/gmail/nossr50/config/mods/ToolConfigManager.java b/src/main/java/com/gmail/nossr50/config/mods/ToolConfigManager.java index af159ae3b..35c6a339f 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/ToolConfigManager.java +++ b/src/main/java/com/gmail/nossr50/config/mods/ToolConfigManager.java @@ -8,7 +8,8 @@ import java.util.regex.Pattern; public class ToolConfigManager { public ToolConfigManager(mcMMO plugin) { - Pattern pattern = Pattern.compile("tools\\.(?:.+)\\.yml"); + Pattern middlePattern = Pattern.compile("tools\\.(?:.+)\\.yml"); + Pattern startPattern = Pattern.compile("(?:.+)\\.tools\\.yml"); File dataFolder = new File(mcMMO.getModDirectory()); File vanilla = new File(dataFolder, "tools.default.yml"); ModManager modManager = mcMMO.getModManager(); @@ -18,7 +19,7 @@ public class ToolConfigManager { } for (String fileName : dataFolder.list()) { - if (!pattern.matcher(fileName).matches()) { + if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) { continue; }