Skip to content

Commit 2cde73d

Browse files
committed
Add event pattern prefix and suffix in registration
1 parent 5319906 commit 2cde73d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/btk5h/skriptmirror/skript/custom/event/EventSyntaxInfo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.btk5h.skriptmirror.skript.custom.event;
22

3+
import ch.njol.skript.lang.SkriptEventInfo;
34
import com.btk5h.skriptmirror.skript.custom.CustomSyntaxSection;
45
import com.btk5h.skriptmirror.util.SkriptMirrorUtil;
56

@@ -13,6 +14,8 @@ protected EventSyntaxInfo(File script, String pattern, int matchedPattern) {
1314
}
1415

1516
public static EventSyntaxInfo create(File script, String pattern, int matchedPattern) {
17+
pattern = "[on] " + pattern + SkriptEventInfo.EVENT_PRIORITY_SYNTAX;
18+
1619
return new EventSyntaxInfo(script, SkriptMirrorUtil.preprocessPattern(pattern), matchedPattern);
1720
}
1821

0 commit comments

Comments
 (0)