mirror of
https://github.com/exituser/Brewery.git
synced 2026-09-17 08:59:01 +00:00
Test: Replace GetData
This commit is contained in:
@@ -8,17 +8,21 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.PotionMeta;
|
import org.bukkit.inventory.meta.PotionMeta;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
import org.bukkit.material.MaterialData;
|
||||||
|
import org.bukkit.material.Stairs;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
import com.dre.brewery.integration.GriefPreventionBarrel;
|
import com.dre.brewery.integration.GriefPreventionBarrel;
|
||||||
import com.dre.brewery.integration.LWCBarrel;
|
import com.dre.brewery.integration.LWCBarrel;
|
||||||
import com.dre.brewery.integration.LogBlockBarrel;
|
import com.dre.brewery.integration.LogBlockBarrel;
|
||||||
import com.dre.brewery.integration.WGBarrel;
|
import com.dre.brewery.integration.WGBarrel;
|
||||||
|
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
|
|
||||||
public class Barrel {
|
public class Barrel {
|
||||||
@@ -743,10 +747,14 @@ public class Barrel {
|
|||||||
if (isStairs(type)) {
|
if (isStairs(type)) {
|
||||||
if (y == 0) {
|
if (y == 0) {
|
||||||
// stairs have to be upside down
|
// stairs have to be upside down
|
||||||
if (block.getData() < 4) {
|
MaterialData data = block.getState().getData();
|
||||||
|
if(data instanceof Stairs){
|
||||||
|
Stairs sdata = (Stairs) data;
|
||||||
|
if (sdata.getFacing() == BlockFace.DOWN) {
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
stairs.add(block.getX());
|
stairs.add(block.getX());
|
||||||
stairs.add(block.getY());
|
stairs.add(block.getY());
|
||||||
stairs.add(block.getZ());
|
stairs.add(block.getZ());
|
||||||
|
|||||||
Reference in New Issue
Block a user