Interface BlockData

    • Method Detail

      • getMaterial

        Material getMaterial()
        Get the Material represented by this block data.
        Returns:
        the material
      • merge

        BlockData merge​(BlockData data)
        Merges all explicitly set states from the given data with this BlockData.
        Note that the given data MUST have been created from one of the String parse methods, e.g. Server.createBlockData(java.lang.String) and not have been subsequently modified.
        Note also that the block types must match identically.
        Parameters:
        data - the data to merge from
        Returns:
        a new instance of this blockdata with the merged data
      • matches

        boolean matches​(BlockData data)
        Checks if the specified BlockData matches this block data.
        The semantics of this method are such that for manually created or modified BlockData it has the same effect as Object.equals(java.lang.Object), whilst for parsed data (that to which merge(org.bukkit.block.data.BlockData) applies, it will return true when the type and all explicitly set states match.
        Note that these semantics mean that a.matches(b) may not be the same as b.matches(a)
        Parameters:
        data - the data to match against (normally a parsed constant)
        Returns:
        if there is a match
      • clone

        BlockData clone()
        Returns a copy of this BlockData.
        Returns:
        a copy of the block data