Skip to content

Commit c9f0139

Browse files
committed
Fix event pattern on Skript 2.7
1 parent b287809 commit c9f0139

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/skriptlang/reflect/syntax/event/EventSyntaxInfo.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.skriptlang.reflect.syntax.event;
22

3+
import ch.njol.skript.Skript;
4+
import ch.njol.skript.util.Version;
35
import com.btk5h.skriptmirror.util.SkriptMirrorUtil;
46
import org.skriptlang.reflect.syntax.CustomSyntaxStructure;
57
import org.skriptlang.skript.lang.script.Script;
@@ -13,6 +15,8 @@ protected EventSyntaxInfo(Script script, String pattern, int matchedPattern) {
1315
}
1416

1517
public static EventSyntaxInfo create(Script script, String pattern, int matchedPattern) {
18+
if (Skript.getVersion().isSmallerThan(new Version(2, 8)))
19+
pattern = "[on] " + pattern + " [with priority (lowest|low|normal|high|highest|monitor)]";
1620
return new EventSyntaxInfo(script, SkriptMirrorUtil.preprocessPattern(pattern), matchedPattern);
1721
}
1822

0 commit comments

Comments
 (0)