From 0e2cdb71cbac7606bf3a3320c279f5556a9292ef Mon Sep 17 00:00:00 2001 From: _OfTeN_ Date: Sun, 26 Sep 2021 03:20:09 +0300 Subject: [PATCH] Fixed mythicmobs:mob_level not working in summon effect. --- .../src/main/java/com/willfp/ecobosses/bosses/EcoBoss.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecobosses/bosses/EcoBoss.java b/eco-core/core-plugin/src/main/java/com/willfp/ecobosses/bosses/EcoBoss.java index 0d9d840..ee99878 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecobosses/bosses/EcoBoss.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecobosses/bosses/EcoBoss.java @@ -543,7 +543,12 @@ public class EcoBoss extends PluginDependent { this.effectNames = new ArrayList<>(); for (String string : this.getConfig().getStrings("effects")) { String effectName = string.split(":")[0]; - List args = Arrays.asList(string.replace(effectName + ":", "").split(":")); + List 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)); }