2016-02-02 07:57:27 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Nik Gil <nikmanG@users.noreply.github.com>
|
2016-03-03 10:46:26 +01:00
|
|
|
Date: Thu, 3 Mar 2016 04:04:19 -0600
|
2016-02-02 07:57:27 +01:00
|
|
|
Subject: [PATCH] Made EntityDismountEvent Cancellable
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2016-03-01 00:09:49 +01:00
|
|
|
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.event.CraftEventFactory;
|
|
|
|
import org.bukkit.event.entity.EntityCombustEvent;
|
|
|
|
import org.bukkit.event.entity.EntityPortalEvent;
|
2016-02-02 07:57:27 +01:00
|
|
|
import org.bukkit.plugin.PluginManager;
|
2016-03-01 00:09:49 +01:00
|
|
|
+import org.spigotmc.event.entity.EntityDismountEvent;
|
2016-02-02 07:57:27 +01:00
|
|
|
// CraftBukkit end
|
|
|
|
|
|
|
|
public abstract class Entity implements ICommandListener {
|
|
|
|
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
|
|
|
}
|
|
|
|
// CraftBukkit end
|
2016-03-03 10:46:26 +01:00
|
|
|
Bukkit.getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity())); // Spigot
|
2016-03-01 00:09:49 +01:00
|
|
|
+ // Paper start - make EntityDismountEvent cancellable
|
|
|
|
+ EntityDismountEvent dismountEvent = new EntityDismountEvent(this.getBukkitEntity(), entity.getBukkitEntity()); // Spigot
|
2016-02-02 07:57:27 +01:00
|
|
|
+ Bukkit.getPluginManager().callEvent(dismountEvent);
|
|
|
|
+ if (dismountEvent.isCancelled()) return;
|
2016-03-01 00:09:49 +01:00
|
|
|
+ // Paper end
|
|
|
|
this.passengers.remove(entity);
|
|
|
|
entity.j = 60;
|
|
|
|
}
|
2016-02-02 07:57:27 +01:00
|
|
|
--
|