mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 06:42:02 +01:00
Fix errorneous call of EntityDismountEvent
This commit is contained in:
parent
7a9efce700
commit
f718f4dbd7
@ -8,22 +8,13 @@ diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
import org.bukkit.event.entity.EntityCombustEvent;
|
||||
import org.bukkit.event.entity.EntityPortalEvent;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
+import org.spigotmc.event.entity.EntityDismountEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
public abstract class Entity implements ICommandListener {
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
Bukkit.getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity())); // Spigot
|
||||
- Bukkit.getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity())); // Spigot
|
||||
+ // Paper start - make EntityDismountEvent cancellable
|
||||
+ EntityDismountEvent dismountEvent = new EntityDismountEvent(this.getBukkitEntity(), entity.getBukkitEntity()); // Spigot
|
||||
+ Bukkit.getPluginManager().callEvent(dismountEvent);
|
||||
+ if (dismountEvent.isCancelled()) return;
|
||||
+ if (!new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity()).callEvent()) return;
|
||||
+ // Paper end
|
||||
this.passengers.remove(entity);
|
||||
entity.j = 60;
|
||||
|
Loading…
Reference in New Issue
Block a user