geforkt von Mirrors/Paper
Fix EntityDismountEvent and VehicleExitEvent cancellation
Perhaps "workaround" would be the better term
Dieser Commit ist enthalten in:
Ursprung
ebff483051
Commit
1ed12cfca6
@ -3,7 +3,6 @@ From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Fri, 22 Apr 2016 01:43:11 -0500
|
||||
Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
|
||||
|
||||
Don't even get me started
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
23
Spigot-Server-Patches/Fix-VehicleExitEvent-cancellation.patch
Normale Datei
23
Spigot-Server-Patches/Fix-VehicleExitEvent-cancellation.patch
Normale Datei
@ -0,0 +1,23 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Fri, 22 Apr 2016 15:42:44 -0500
|
||||
Subject: [PATCH] Fix VehicleExitEvent cancellation
|
||||
|
||||
|
||||
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
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle();
|
||||
Entity n = craftn == null ? null : craftn.getHandle();
|
||||
if (event.isCancelled() || n != orig) {
|
||||
+ // Paper - Fix cancellation
|
||||
+ if (entity instanceof EntityPlayer) {
|
||||
+ ((EntityPlayer) entity).playerConnection.sendPacket(new net.minecraft.server.PacketPlayOutMount(this));
|
||||
+ }
|
||||
+ // Paper end
|
||||
return;
|
||||
}
|
||||
}
|
||||
--
|
@ -14,7 +14,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
// CraftBukkit end
|
||||
- Bukkit.getPluginManager().callEvent( new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity())); // Spigot
|
||||
+ // Paper start - make EntityDismountEvent cancellable
|
||||
+ if (!new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity()).callEvent()) return;
|
||||
+ if (!new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity()).callEvent()) {
|
||||
+ if (entity instanceof EntityPlayer) {
|
||||
+ ((EntityPlayer) entity).playerConnection.sendPacket(new net.minecraft.server.PacketPlayOutMount(this));
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
this.passengers.remove(entity);
|
||||
entity.j = 60;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren