mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2024-11-04 08:49:55 +01:00
Test: Replace GetData
This commit is contained in:
parent
8d8d83c176
commit
ba87aaabcf
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user