diff options
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockIce.java | 11 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/BlockSnow.java | 11 |
2 files changed, 4 insertions, 18 deletions
diff --git a/src/main/java/net/minecraft/server/BlockIce.java b/src/main/java/net/minecraft/server/BlockIce.java index 16044958..44f3573b 100644 --- a/src/main/java/net/minecraft/server/BlockIce.java +++ b/src/main/java/net/minecraft/server/BlockIce.java @@ -1,8 +1,7 @@ package net.minecraft.server; import java.util.Random; - -import org.bukkit.event.block.BlockFadeEvent; // CraftBukkit +import org.bukkit.craftbukkit.event.CraftEventFactory; public class BlockIce extends BlockBreakable { @@ -28,13 +27,7 @@ public class BlockIce extends BlockBreakable { public void a(World world, int i, int j, int k, Random random) { if (world.a(EnumSkyBlock.BLOCK, i, j, k) > 11 - Block.q[this.id]) { // CraftBukkit start - org.bukkit.block.BlockState blockState = world.getWorld().getBlockAt(i, j, k).getState(); - blockState.setTypeId(Block.STATIONARY_WATER.id); - - BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState); - world.getServer().getPluginManager().callEvent(event); - - if (event.isCancelled()) { + if (CraftEventFactory.callBlockFadeEvent(world.getWorld().getBlockAt(i, j, k), Block.STATIONARY_WATER.id).isCancelled()) { return; } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/BlockSnow.java b/src/main/java/net/minecraft/server/BlockSnow.java index 22fa603e..bec19919 100644 --- a/src/main/java/net/minecraft/server/BlockSnow.java +++ b/src/main/java/net/minecraft/server/BlockSnow.java @@ -1,8 +1,7 @@ package net.minecraft.server; import java.util.Random; - -import org.bukkit.event.block.BlockFadeEvent; // CraftBukkit +import org.bukkit.craftbukkit.event.CraftEventFactory; public class BlockSnow extends Block { @@ -78,13 +77,7 @@ public class BlockSnow extends Block { public void a(World world, int i, int j, int k, Random random) { if (world.a(EnumSkyBlock.BLOCK, i, j, k) > 11) { // CraftBukkit start - org.bukkit.block.BlockState blockState = world.getWorld().getBlockAt(i, j, k).getState(); - blockState.setTypeId(0); - - BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState); - world.getServer().getPluginManager().callEvent(event); - - if (event.isCancelled()) { + if (CraftEventFactory.callBlockFadeEvent(world.getWorld().getBlockAt(i, j, k), 0).isCancelled()) { return; } // CraftBukkit end |