aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-API-Patches/0013-Made-EntityDismountEvent-Cancellable.patch
blob: 5e3a5c90e855074c2f1120e9eb91477ba27263fc (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 c5908bf5ae2b8e9dc4058efb952dc182561ec098 Mon Sep 17 00:00:00 2001
From: Nik Gil <nikmanG@users.noreply.github.com>
Date: Mon, 29 Feb 2016 19:42:10 -0600
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..ce989bb 100644
--- a/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java
+++ b/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java
@@ -1,6 +1,7 @@
 package org.spigotmc.event.entity;
 
 import org.bukkit.entity.Entity;
+import org.bukkit.event.Cancellable;
 import org.bukkit.event.HandlerList;
 import org.bukkit.event.entity.EntityEvent;
 
@@ -8,7 +9,7 @@ import org.bukkit.event.entity.EntityEvent;
  * Called when an entity stops riding another entity.
  *
  */
-public class EntityDismountEvent extends EntityEvent
+public class EntityDismountEvent extends EntityEvent implements Cancellable // Paper - implement Cancellable
 {
 
     private static final HandlerList handlers = new HandlerList();
@@ -36,4 +37,16 @@ public class EntityDismountEvent extends EntityEvent
     {
         return handlers;
     }
+
+    // Paper start - Implement cancellable methods
+    @Override
+    public boolean isCancelled() {
+        return cancelled;
+    }
+
+    @Override
+    public void setCancelled(boolean cancelled) {
+        this.cancelled = cancelled;
+    }
+    // Paper end
 }
-- 
2.9.2.windows.1