Archiviert
13
0

SPIGOT-1605: Fix EntityChangeBlockEvent.setCancelled(Z)V

Dieser Commit ist enthalten in:
md_5 2016-03-02 17:07:08 +11:00
Ursprung b0411e8799
Commit 2fe69605ec

Datei anzeigen

@ -18,11 +18,13 @@
this.world.setAir(blockposition); this.world.setAir(blockposition);
} else if (!this.world.isClientSide) { } else if (!this.world.isClientSide) {
this.die(); this.die();
@@ -94,6 +96,12 @@ @@ -93,7 +95,13 @@
if (iblockdata.getBlock() != Blocks.PISTON_EXTENSION) {
this.die(); this.die();
if (!this.f) { if (!this.f) {
if (this.world.a(block, blockposition, true, EnumDirection.UP, (Entity) null, (ItemStack) null) && !BlockFalling.i(this.world.getType(blockposition.down())) && this.world.setTypeAndData(blockposition, this.block, 3)) { - if (this.world.a(block, blockposition, true, EnumDirection.UP, (Entity) null, (ItemStack) null) && !BlockFalling.i(this.world.getType(blockposition.down())) && this.world.setTypeAndData(blockposition, this.block, 3)) {
+ // CraftBukkit start + // CraftBukkit start
+ if (this.world.a(block, blockposition, true, EnumDirection.UP, (Entity) null, (ItemStack) null) && !BlockFalling.i(this.world.getType(blockposition.down()))) {
+ if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this.block.getBlock(), this.block.getBlock().toLegacyData(this.block)).isCancelled()) { + if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this.block.getBlock(), this.block.getBlock().toLegacyData(this.block)).isCancelled()) {
+ return; + return;
+ } + }