/
ScriptEntryExecuteEvent.java
51 lines (38 loc) · 1.19 KB
/
ScriptEntryExecuteEvent.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package net.aufdemrand.denizen.events;
import net.aufdemrand.denizen.scripts.ScriptEntry;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
public class ScriptEntryExecuteEvent extends Event implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private ScriptEntry scriptEntry;
private boolean cancelled = false;
private boolean altered = false;
public ScriptEntryExecuteEvent(ScriptEntry scriptEntry) {
this.scriptEntry = scriptEntry;
}
public void alterScriptEntry(ScriptEntry scriptEntry) {
this.scriptEntry = scriptEntry;
altered = true;
}
public HandlerList getHandlers() {
return handlers;
}
public static HandlerList getHandlerList() {
return handlers;
}
public ScriptEntry getScriptEntry() {
return scriptEntry;
}
public boolean isAltered() {
return altered;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean arg0) {
cancelled = arg0;
}
}