We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ba1ea7 commit 73fd92aCopy full SHA for 73fd92a
1 file changed
src/main/java/io/github/techstreet/dfscript/script/execution/ScriptTask.java
@@ -9,11 +9,13 @@ public class ScriptTask {
9
private final ScriptPosStack stack;
10
private final Event event;
11
private boolean running;
12
+ private final Script script;
13
private final ScriptContext context;
14
15
public ScriptTask(ScriptPosStack stack, Event event, Script script) {
16
this.stack = stack;
17
this.event = event;
18
+ this.script = script;
19
this.context = script.getContext();
20
running = true;
21
}
@@ -31,6 +33,10 @@ public void stop() {
31
33
32
34
35
public void run() {
36
+ if (script.disabled()) { // don't run the code if it's disabled obviously
37
+ return;
38
+ }
39
+
40
41
while(true) {
42
if(!running) break;
0 commit comments