blob: 0a0c7941de2b89e50f2971e1b04df8be77bc465d (
plain)
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
|
From 09b55d7828f2499a4179e60f0be9dbb6b7888ba8 Mon Sep 17 00:00:00 2001
From: Nik Gil <nikmanG@users.noreply.github.com>
Date: Mon, 1 Feb 2016 23:36:31 -0700
Subject: [PATCH] Made EntityDismountEvent Cancellable
diff --git a/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java b/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java
index 24d4942..b35c7c1 100644
--- a/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java
+++ b/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java
@@ -4,11 +4,15 @@ import org.bukkit.entity.Entity;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityEvent;
+// PaperSpigot start
+import org.bukkit.event.Cancellable;
+// PaperSpigot end
+
/**
* Called when an entity stops riding another entity.
*
*/
-public class EntityDismountEvent extends EntityEvent
+public class EntityDismountEvent extends EntityEvent implements Cancellable // PaperSpigot - implement Cancellable
{
private static final HandlerList handlers = new HandlerList();
@@ -36,4 +40,16 @@ public class EntityDismountEvent extends EntityEvent
{
return handlers;
}
+
+ // PaperSpigot start - implement Cancellable methods
+ @Override
+ public boolean isCancelled() {
+ return cancelled;
+ }
+
+ @Override
+ public void setCancelled(boolean cancelled) {
+ this.cancelled = cancelled;
+ }
+ // PaperSpigot end
}
--
2.7.0
|