2018-08-03 01:18:11 +02:00
|
|
|
--- a/net/minecraft/server/PathfinderGoalDoorInteract.java
|
|
|
|
+++ b/net/minecraft/server/PathfinderGoalDoorInteract.java
|
|
|
|
@@ -37,6 +37,14 @@
|
|
|
|
IBlockData iblockdata = this.a.world.getType(this.b);
|
|
|
|
|
|
|
|
if (iblockdata.getBlock() instanceof BlockDoor) {
|
|
|
|
+ // CraftBukkit start - entities opening doors
|
2018-08-03 01:59:22 +02:00
|
|
|
+ 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));
|
2018-08-03 01:18:11 +02:00
|
|
|
+ this.a.world.getServer().getPluginManager().callEvent(event);
|
|
|
|
+ if (event.isCancelled()) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CaftBukkit end
|
|
|
|
+
|
|
|
|
((BlockDoor) iblockdata.getBlock()).setDoor(this.a.world, this.b, flag);
|
|
|
|
}
|
|
|
|
}
|