Search in sources :

Example 1 with Levelled

use of org.bukkit.block.data.Levelled in project Denizen-For-Bukkit by DenizenScript.

the class MaterialLevel method describes.

public static boolean describes(ObjectTag material) {
    if (!(material instanceof MaterialTag)) {
        return false;
    }
    MaterialTag mat = (MaterialTag) material;
    if (!mat.hasModernData()) {
        return false;
    }
    BlockData data = mat.getModernData();
    return data instanceof Levelled || data instanceof Cake || data instanceof Snow || data instanceof Farmland || data instanceof Beehive;
}
Also used : MaterialTag(com.denizenscript.denizen.objects.MaterialTag) Snow(org.bukkit.block.data.type.Snow) Beehive(org.bukkit.block.data.type.Beehive) Cake(org.bukkit.block.data.type.Cake) Farmland(org.bukkit.block.data.type.Farmland) Levelled(org.bukkit.block.data.Levelled) BlockData(org.bukkit.block.data.BlockData)

Aggregations

MaterialTag (com.denizenscript.denizen.objects.MaterialTag)1 BlockData (org.bukkit.block.data.BlockData)1 Levelled (org.bukkit.block.data.Levelled)1 Beehive (org.bukkit.block.data.type.Beehive)1 Cake (org.bukkit.block.data.type.Cake)1 Farmland (org.bukkit.block.data.type.Farmland)1 Snow (org.bukkit.block.data.type.Snow)1