Use CraftBlock.at helper

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2018-08-03 09:59:22 +10:00
parent 39b7d82633
commit 3445f8b002

View file

@ -5,7 +5,7 @@
if (iblockdata.getBlock() instanceof BlockDoor) {
+ // CraftBukkit start - entities opening doors
+ org.bukkit.event.entity.EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(this.a.getBukkitEntity(), this.a.world.getWorld().getBlockAt(this.b.getX(), this.b.getY(), this.b.getZ()));
+ org.bukkit.event.entity.EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(this.a.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(this.a.world, this.b));
+ this.a.world.getServer().getPluginManager().callEvent(event);
+ if (event.isCancelled()) {
+ return;