diff --git a/src/com/dre/brewery/Barrel.java b/src/com/dre/brewery/Barrel.java index ae3f193..46ba6c2 100644 --- a/src/com/dre/brewery/Barrel.java +++ b/src/com/dre/brewery/Barrel.java @@ -8,17 +8,21 @@ import org.bukkit.Material; import org.bukkit.entity.HumanEntity; import org.bukkit.entity.Player; import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.PotionMeta; import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.material.MaterialData; +import org.bukkit.material.Stairs; import org.bukkit.plugin.Plugin; import com.dre.brewery.integration.GriefPreventionBarrel; import com.dre.brewery.integration.LWCBarrel; import com.dre.brewery.integration.LogBlockBarrel; import com.dre.brewery.integration.WGBarrel; + import org.apache.commons.lang.ArrayUtils; public class Barrel { @@ -743,8 +747,12 @@ public class Barrel { if (isStairs(type)) { if (y == 0) { // stairs have to be upside down - if (block.getData() < 4) { - return block; + MaterialData data = block.getState().getData(); + if(data instanceof Stairs){ + Stairs sdata = (Stairs) data; + if (sdata.getFacing() == BlockFace.DOWN) { + return block; + } } } stairs.add(block.getX());