-
-
Notifications
You must be signed in to change notification settings - Fork 54
/
NPCOpenDoorEvent.java
47 lines (37 loc) · 988 Bytes
/
NPCOpenDoorEvent.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
package net.citizensnpcs.api.event;
import org.bukkit.block.Block;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
import net.citizensnpcs.api.npc.NPC;
public class NPCOpenDoorEvent extends NPCEvent implements Cancellable {
private final Block block;
private boolean cancelled;
public NPCOpenDoorEvent(NPC npc, Block block) {
super(npc);
this.block = block;
}
/**
* Returns the {@link Block} that was opened.
*
* @return The block
*/
public Block getDoor() {
return block;
}
@Override
public HandlerList getHandlers() {
return handlers;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public void setCancelled(boolean arg0) {
cancelled = arg0;
}
public static HandlerList getHandlerList() {
return handlers;
}
private static final HandlerList handlers = new HandlerList();
}