Skip to content

Commit e20a8a0

Browse files
committed
made disabled scripts work again because i forgot to do that in the previous pull request lol
1 parent 554a8a7 commit e20a8a0

File tree

1 file changed

+2
-2
lines changed
  • src/main/java/io/github/techstreet/dfscript/script

1 file changed

+2
-2
lines changed

src/main/java/io/github/techstreet/dfscript/script/Script.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ public void setFile(File file) {
8383
}
8484

8585
public void invoke(Event event) {
86-
int pos = 0;
86+
if(disabled) return;
87+
8788
for (ScriptHeader part : headers) {
8889
if (part instanceof ScriptEvent se) {
8990
if (se.getType().getCodeutilitiesEvent().equals(event.getClass())) {
@@ -98,7 +99,6 @@ public void invoke(Event event) {
9899
}
99100
}
100101
}
101-
pos++;
102102
}
103103
}
104104

0 commit comments

Comments
 (0)