Use CraftBlock.at helper

This commit is contained in:
md_5 2018-08-03 09:59:22 +10:00
parent 7dc4738528
commit 3006dee4c6

View File

@ -5,7 +5,7 @@
if (iblockdata.getBlock() instanceof BlockDoor) { if (iblockdata.getBlock() instanceof BlockDoor) {
+ // CraftBukkit start - entities opening doors + // 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); + this.a.world.getServer().getPluginManager().callEvent(event);
+ if (event.isCancelled()) { + if (event.isCancelled()) {
+ return; + return;