Search in sources :

Example 1 with Openable

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

the class MaterialSwitchable 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 Powerable || data instanceof Openable || data instanceof Dispenser || data instanceof DaylightDetector || data instanceof Piston || data instanceof Lightable || data instanceof EndPortalFrame || data instanceof Hopper;
}
Also used : MaterialTag(com.denizenscript.denizen.objects.MaterialTag) Lightable(org.bukkit.block.data.Lightable) Powerable(org.bukkit.block.data.Powerable) BlockData(org.bukkit.block.data.BlockData) Openable(org.bukkit.block.data.Openable)

Aggregations

MaterialTag (com.denizenscript.denizen.objects.MaterialTag)1 BlockData (org.bukkit.block.data.BlockData)1 Lightable (org.bukkit.block.data.Lightable)1 Openable (org.bukkit.block.data.Openable)1 Powerable (org.bukkit.block.data.Powerable)1