2016-08-28 07:41:58 +08:00
|
|
|
From c5908bf5ae2b8e9dc4058efb952dc182561ec098 Mon Sep 17 00:00:00 2001
|
2016-02-02 14:57:27 +08:00
|
|
|
From: Nik Gil <nikmanG@users.noreply.github.com>
|
2016-03-01 07:09:49 +08:00
|
|
|
Date: Mon, 29 Feb 2016 19:42:10 -0600
|
2016-02-02 14:57:27 +08:00
|
|
|
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
|
2016-03-01 07:09:49 +08:00
|
|
|
index 24d4942..ce989bb 100644
|
2016-02-02 14:57:27 +08:00
|
|
|
--- a/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java
|
2016-03-01 07:09:49 +08:00
|
|
|
@@ -1,6 +1,7 @@
|
|
|
|
package org.spigotmc.event.entity;
|
|
|
|
|
|
|
|
import org.bukkit.entity.Entity;
|
|
|
|
+import org.bukkit.event.Cancellable;
|
2016-02-02 14:57:27 +08:00
|
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
import org.bukkit.event.entity.EntityEvent;
|
|
|
|
|
2016-03-01 07:09:49 +08:00
|
|
|
@@ -8,7 +9,7 @@ import org.bukkit.event.entity.EntityEvent;
|
2016-02-02 14:57:27 +08:00
|
|
|
* Called when an entity stops riding another entity.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
-public class EntityDismountEvent extends EntityEvent
|
2016-03-01 07:09:49 +08:00
|
|
|
+public class EntityDismountEvent extends EntityEvent implements Cancellable // Paper - implement Cancellable
|
2016-02-02 14:57:27 +08:00
|
|
|
{
|
|
|
|
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
2016-03-01 07:09:49 +08:00
|
|
|
@@ -36,4 +37,16 @@ public class EntityDismountEvent extends EntityEvent
|
2016-02-02 14:57:27 +08:00
|
|
|
{
|
|
|
|
return handlers;
|
|
|
|
}
|
|
|
|
+
|
2016-03-01 07:09:49 +08:00
|
|
|
+ // Paper start - Implement cancellable methods
|
2016-02-02 14:57:27 +08:00
|
|
|
+ @Override
|
|
|
|
+ public boolean isCancelled() {
|
|
|
|
+ return cancelled;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setCancelled(boolean cancelled) {
|
|
|
|
+ this.cancelled = cancelled;
|
|
|
|
+ }
|
2016-03-01 07:09:49 +08:00
|
|
|
+ // Paper end
|
2016-02-02 14:57:27 +08:00
|
|
|
}
|
|
|
|
--
|
2016-08-28 07:41:58 +08:00
|
|
|
2.9.2.windows.1
|
2016-02-02 14:57:27 +08:00
|
|
|
|