9
0
mirror of https://github.com/Auxilor/EcoMobs.git synced 2025-12-20 07:29:21 +00:00

Merge pull request #9

Fixed mythicmobs:mob_level not working in summon effect.
This commit is contained in:
Will FP
2021-09-26 13:57:06 +01:00
committed by GitHub

View File

@@ -543,7 +543,12 @@ public class EcoBoss extends PluginDependent<EcoPlugin> {
this.effectNames = new ArrayList<>();
for (String string : this.getConfig().getStrings("effects")) {
String effectName = string.split(":")[0];
List<String> args = Arrays.asList(string.replace(effectName + ":", "").split(":"));
List<String> args = new ArrayList<>(Arrays.asList(string.replace(effectName + ":", "").split(":")));
if (args.contains("mythicmobs")) {
String newArg = "mythicmobs:" + args.get(args.indexOf("mythicmobs")+1);
args.set(args.indexOf("mythicmobs"), newArg);
args.remove(args.get(args.indexOf(newArg)+1));
}
this.effectNames.add(new ArgumentedEffectName(effectName, args));
}