Allow mod name to go in the middle or at the beginning.

This commit is contained in:
GJ 2014-02-04 07:53:54 -05:00
parent 8e040ae8d9
commit abfedf381d
5 changed files with 13 additions and 9 deletions

View File

@ -20,7 +20,7 @@ Version 1.4.08-dev
+ Added new experience bonus perk 'mcmmo.perks.xp.10percentboost.<skillname>' multiplies incoming XP by 1.1
+ Added new experience bonus perk 'mcmmo.perks.xp.customboost.<skillname>' 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.<modname>.yml or <modname>.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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}