SPIGOT-6797: EntityInteractEvent called with incorrect location

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2021-11-21 11:22:07 +11:00
parent 99916e6058
commit 306648dc4c

View file

@ -19,7 +19,7 @@
if (!blockdoor1.h(iblockdata1)) {
+ // CraftBukkit start - entities opening doors
+ org.bukkit.event.entity.EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(entityliving.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(entityliving.level, blockposition));
+ org.bukkit.event.entity.EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(entityliving.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(entityliving.level, blockposition1));
+ entityliving.level.getCraftServer().getPluginManager().callEvent(event);
+ if (event.isCancelled()) {
+ return;