48 Zeilen
1.4 KiB
Diff
48 Zeilen
1.4 KiB
Diff
|
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
|
||
|
|