diff options
author | KHobbits <rob@khobbits.co.uk> | 2014-03-26 15:14:40 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2014-03-26 15:14:40 +0000 |
commit | 99a9e9fb501fe640f0bbd4b7d9c77bdb18af2491 (patch) | |
tree | e850b7ef3980b8cb57e22e9b4109dfcd003e9177 | |
parent | 8b0ade3e1d1b42c6d6557745e8c21c0d5474b602 (diff) | |
download | Essentials-99a9e9fb501fe640f0bbd4b7d9c77bdb18af2491.tar Essentials-99a9e9fb501fe640f0bbd4b7d9c77bdb18af2491.tar.gz Essentials-99a9e9fb501fe640f0bbd4b7d9c77bdb18af2491.tar.lz Essentials-99a9e9fb501fe640f0bbd4b7d9c77bdb18af2491.tar.xz Essentials-99a9e9fb501fe640f0bbd4b7d9c77bdb18af2491.zip |
Revert "Do not allow a block with an Essentials Sign attached to it to be pulled with a sticky piston"
This reverts commit 8b0ade3e1d1b42c6d6557745e8c21c0d5474b602.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java index 55b05a0e1..225965c2b 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java @@ -1,17 +1,16 @@ package com.earth2me.essentials; -import com.earth2me.essentials.signs.EssentialsSign; import com.earth2me.essentials.utils.LocationUtil; import java.util.Locale; import net.ess3.api.IEssentials; import org.bukkit.GameMode; import org.bukkit.Material; -import org.bukkit.block.*; +import org.bukkit.block.BlockState; +import org.bukkit.block.CreatureSpawner; import org.bukkit.entity.EntityType; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockPistonRetractEvent; import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.inventory.ItemStack; @@ -69,26 +68,4 @@ public class EssentialsBlockListener implements Listener }); } } - - @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) - public void onBlockPistonRetract(BlockPistonRetractEvent event) - { - final Block block = event.getRetractLocation().getBlock(); - for (BlockFace face : new BlockFace[] { BlockFace.NORTH, BlockFace.EAST, BlockFace.WEST, BlockFace.SOUTH, BlockFace.UP }) - { - final Block search = block.getRelative(face, 1); - final Material type = search.getType(); - if (type == Material.SIGN || type == Material.SIGN_POST) - { - final Sign sign = (Sign)(search.getState()); - for (final EssentialsSign esign : ess.getSettings().enabledSigns()) - { - if (sign.getLine(0).equalsIgnoreCase(esign.getSuccessName())) - { - event.setCancelled(true); - } - } - } - } - } } |