Fix config values not being evaluated properly [SD-8381, SD-8387]
Bug introduced in 423ae8977e
This commit is contained in:
parent
1053438274
commit
a4121cb0a3
|
@ -123,7 +123,6 @@ public class EpicEnchants extends SongodaPlugin {
|
|||
|
||||
@Override
|
||||
public void onDataLoad() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,6 +28,6 @@ public class LeveledModifier {
|
|||
String toTest = Placeholders.setPlaceholders(string, user, opponent, level);
|
||||
|
||||
Object value = GeneralUtils.parseJS(toTest, "LeveledModifier", def);
|
||||
return value instanceof Double ? (double)value : (int)value;
|
||||
return value instanceof Double ? (double) value : (int) value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,8 +85,7 @@ public class GeneralUtils {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static int getHeldItemSlot(Player entity, Event event) {
|
||||
Player player = (Player) entity;
|
||||
public static int getHeldItemSlot(Player player, Event event) {
|
||||
int slot = player.getInventory().getHeldItemSlot();
|
||||
|
||||
try {
|
||||
|
@ -100,7 +99,6 @@ public class GeneralUtils {
|
|||
}
|
||||
|
||||
public static Object parseJS(String toParse, String type, Object def) {
|
||||
return MathUtils.eval("[EpicEnchants] One of your " + type + " expressions is not properly formatted.", toParse);
|
||||
|
||||
return MathUtils.eval(toParse, "[EpicEnchants] One of your " + type + " expressions is not properly formatted.");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue