Test: Replace GetData

This commit is contained in:
Frank Baumann 2014-05-19 15:41:52 +02:00
parent 8d8d83c176
commit ba87aaabcf

View File

@ -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());