mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 22:13:42 +01:00
16 lines
727 B
Diff
16 lines
727 B
Diff
--- a/net/minecraft/server/PathfinderGoalBreakDoor.java
|
|
+++ b/net/minecraft/server/PathfinderGoalBreakDoor.java
|
|
@@ -66,6 +66,12 @@
|
|
}
|
|
|
|
if (this.a == this.f() && this.a(this.entity.world.getDifficulty())) {
|
|
+ // CraftBukkit start
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreakDoorEvent(this.entity, this.door).isCancelled()) {
|
|
+ this.c();
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
this.entity.world.a(this.door, false);
|
|
this.entity.world.triggerEffect(1021, this.door, 0);
|
|
this.entity.world.triggerEffect(2001, this.door, Block.getCombinedId(this.entity.world.getType(this.door)));
|