File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/main/java/io/github/techstreet/dfscript/script/execution Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,13 @@ public class ScriptTask {
99 private final ScriptPosStack stack ;
1010 private final Event event ;
1111 private boolean running ;
12+ private final Script script ;
1213 private final ScriptContext context ;
1314
1415 public ScriptTask (ScriptPosStack stack , Event event , Script script ) {
1516 this .stack = stack ;
1617 this .event = event ;
18+ this .script = script ;
1719 this .context = script .getContext ();
1820 running = true ;
1921 }
@@ -31,6 +33,10 @@ public void stop() {
3133 }
3234
3335 public void run () {
36+ if (script .disabled ()) { // don't run the code if it's disabled obviously
37+ return ;
38+ }
39+
3440 running = true ;
3541 while (true ) {
3642 if (!running ) break ;
You can’t perform that action at this time.
0 commit comments