mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
fix EntityDismountEvent being fired on gen threads
This commit is contained in:
parent
849ede2317
commit
d84b4a3b26
1 changed files with 9 additions and 0 deletions
|
@ -18,6 +18,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
VehicleExitEvent event = new VehicleExitEvent(
|
||||
(Vehicle) getBukkitEntity(),
|
||||
(LivingEntity) entity.getBukkitEntity(), !suppressCancellation // Paper
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
org.spigotmc.event.entity.EntityDismountEvent event = new org.spigotmc.event.entity.EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity(), !suppressCancellation); // Paper
|
||||
- Bukkit.getPluginManager().callEvent(event);
|
||||
+ if (MCUtil.isMainThread()) Bukkit.getPluginManager().callEvent(event); // Paper
|
||||
if (event.isCancelled()) {
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
|
|
Loading…
Reference in a new issue