mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 11:03:43 +01:00 
			
		
		
		
	Allow mod name to go in the middle or at the beginning.
This commit is contained in:
		@@ -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.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 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 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 where LeafBlower permissions were ignored
 | 
				
			||||||
 = Fixed bug with toggle commands not properly displaying the success message.
 | 
					 = Fixed bug with toggle commands not properly displaying the success message.
 | 
				
			||||||
 = Fixed IllegalArgumentException caused by an empty Fishing treasure category
 | 
					 = Fixed IllegalArgumentException caused by an empty Fishing treasure category
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,8 @@ import java.util.regex.Pattern;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
public class ArmorConfigManager {
 | 
					public class ArmorConfigManager {
 | 
				
			||||||
    public ArmorConfigManager(mcMMO plugin) {
 | 
					    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 dataFolder = new File(mcMMO.getModDirectory());
 | 
				
			||||||
        File vanilla = new File(dataFolder, "armor.default.yml");
 | 
					        File vanilla = new File(dataFolder, "armor.default.yml");
 | 
				
			||||||
        ModManager modManager = mcMMO.getModManager();
 | 
					        ModManager modManager = mcMMO.getModManager();
 | 
				
			||||||
@@ -18,7 +19,7 @@ public class ArmorConfigManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for (String fileName : dataFolder.list()) {
 | 
					        for (String fileName : dataFolder.list()) {
 | 
				
			||||||
            if (!pattern.matcher(fileName).matches()) {
 | 
					            if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,8 @@ import java.util.regex.Pattern;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
public class BlockConfigManager {
 | 
					public class BlockConfigManager {
 | 
				
			||||||
    public BlockConfigManager(mcMMO plugin) {
 | 
					    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 dataFolder = new File(mcMMO.getModDirectory());
 | 
				
			||||||
        File vanilla = new File(dataFolder, "blocks.default.yml");
 | 
					        File vanilla = new File(dataFolder, "blocks.default.yml");
 | 
				
			||||||
        ModManager modManager = mcMMO.getModManager();
 | 
					        ModManager modManager = mcMMO.getModManager();
 | 
				
			||||||
@@ -18,7 +19,7 @@ public class BlockConfigManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for (String fileName : dataFolder.list()) {
 | 
					        for (String fileName : dataFolder.list()) {
 | 
				
			||||||
            if (!pattern.matcher(fileName).matches()) {
 | 
					            if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,8 @@ import java.util.regex.Pattern;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
public class EntityConfigManager {
 | 
					public class EntityConfigManager {
 | 
				
			||||||
    public EntityConfigManager(mcMMO plugin) {
 | 
					    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 dataFolder = new File(mcMMO.getModDirectory());
 | 
				
			||||||
        File vanilla = new File(dataFolder, "entities.default.yml");
 | 
					        File vanilla = new File(dataFolder, "entities.default.yml");
 | 
				
			||||||
        ModManager modManager = mcMMO.getModManager();
 | 
					        ModManager modManager = mcMMO.getModManager();
 | 
				
			||||||
@@ -18,7 +19,7 @@ public class EntityConfigManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for (String fileName : dataFolder.list()) {
 | 
					        for (String fileName : dataFolder.list()) {
 | 
				
			||||||
            if (!pattern.matcher(fileName).matches()) {
 | 
					            if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,8 @@ import java.util.regex.Pattern;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
public class ToolConfigManager {
 | 
					public class ToolConfigManager {
 | 
				
			||||||
    public ToolConfigManager(mcMMO plugin) {
 | 
					    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 dataFolder = new File(mcMMO.getModDirectory());
 | 
				
			||||||
        File vanilla = new File(dataFolder, "tools.default.yml");
 | 
					        File vanilla = new File(dataFolder, "tools.default.yml");
 | 
				
			||||||
        ModManager modManager = mcMMO.getModManager();
 | 
					        ModManager modManager = mcMMO.getModManager();
 | 
				
			||||||
@@ -18,7 +19,7 @@ public class ToolConfigManager {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for (String fileName : dataFolder.list()) {
 | 
					        for (String fileName : dataFolder.list()) {
 | 
				
			||||||
            if (!pattern.matcher(fileName).matches()) {
 | 
					            if (!middlePattern.matcher(fileName).matches() && !startPattern.matcher(fileName).matches()) {
 | 
				
			||||||
                continue;
 | 
					                continue;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user