Archiviert
13
0

SPIGOT-1762: Call EntityChangeBlockEvent for boats destroying lily pads

Dieser Commit ist enthalten in:
BlackHole 2016-03-06 03:05:59 +01:00 committet von md_5
Ursprung 55b0def5d9
Commit be0bbbabef

Datei anzeigen

@ -0,0 +1,11 @@
--- a/net/minecraft/server/BlockWaterLily.java
+++ b/net/minecraft/server/BlockWaterLily.java
@@ -19,7 +19,7 @@
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
super.a(world, blockposition, iblockdata, entity);
- if (entity instanceof EntityBoat) {
+ if (entity instanceof EntityBoat && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition.getX(), blockposition.getY(), blockposition.getZ(), Blocks.AIR, 0).isCancelled()) { // CraftBukkit
world.setAir(new BlockPosition(blockposition), true);
}