diff --git a/src/main/java/com/btk5h/skriptmirror/util/SkriptReflection.java b/src/main/java/com/btk5h/skriptmirror/util/SkriptReflection.java index f3ca30d..6c6f41d 100644 --- a/src/main/java/com/btk5h/skriptmirror/util/SkriptReflection.java +++ b/src/main/java/com/btk5h/skriptmirror/util/SkriptReflection.java @@ -9,7 +9,6 @@ import ch.njol.skript.expressions.base.EventValueExpression; import ch.njol.skript.lang.DefaultExpression; import ch.njol.skript.lang.ExpressionInfo; -import ch.njol.skript.lang.SkriptParser; import ch.njol.skript.lang.SyntaxElementInfo; import ch.njol.skript.registrations.Classes; import ch.njol.skript.structures.StructOptions; @@ -36,7 +35,6 @@ public class SkriptReflection { private static Method VARIABLES_MAP_COPY; private static Field DEFAULT_EXPRESSION; private static Field PARSED_VALUE; - private static Method PARSE_I; private static Field EXPRESSIONS; private static Field OPTIONS; @@ -101,18 +99,6 @@ public class SkriptReflection { "therefore and/or warnings won't be suppressed"); } - try { - if (Skript.getVersion().compareTo(2, 8) >= 0) { - _METHOD = SkriptParser.class.getDeclaredMethod("parse_i", String.class); - } else { - _METHOD = SkriptParser.class.getDeclaredMethod("parse_i", String.class, int.class, int.class); - } - _METHOD.setAccessible(true); - PARSE_I = _METHOD; - } catch (NoSuchMethodException e) { - warning("Skript's parse_i method could not be resolved, therefore prioritized loading won't work."); - } - try { _FIELD = Skript.class.getDeclaredField("expressions"); _FIELD.setAccessible(true); @@ -285,20 +271,6 @@ public static void disableAndOrWarnings() { } } - /** - * Executes {@link SkriptParser}'s {@code parse_i} method with the given arguments. - */ - public static SkriptParser.ParseResult parse_i(SkriptParser skriptParser, String pattern, int i, int j) { - if (PARSE_I == null) - return null; - - try { - return (SkriptParser.ParseResult) PARSE_I.invoke(skriptParser, pattern, i, j); - } catch (IllegalAccessException | InvocationTargetException e) { - throw new RuntimeException(e); - } - } - /** * {@return} a list of all of Skript's registered {@link ch.njol.skript.lang.Expression}s. */