Search in sources :

Example 1 with TurtleEgg

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

the class MaterialCount 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 SeaPickle || data instanceof TurtleEgg || data instanceof RespawnAnchor || (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_17) && data instanceof Candle);
}
Also used : MaterialTag(com.denizenscript.denizen.objects.MaterialTag) Candle(org.bukkit.block.data.type.Candle) SeaPickle(org.bukkit.block.data.type.SeaPickle) RespawnAnchor(org.bukkit.block.data.type.RespawnAnchor) BlockData(org.bukkit.block.data.BlockData) TurtleEgg(org.bukkit.block.data.type.TurtleEgg)

Aggregations

MaterialTag (com.denizenscript.denizen.objects.MaterialTag)1 BlockData (org.bukkit.block.data.BlockData)1 Candle (org.bukkit.block.data.type.Candle)1 RespawnAnchor (org.bukkit.block.data.type.RespawnAnchor)1 SeaPickle (org.bukkit.block.data.type.SeaPickle)1 TurtleEgg (org.bukkit.block.data.type.TurtleEgg)1