diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/block/data/BlockData.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java index b3e13733..3f64c741 100644 --- a/src/main/java/org/bukkit/block/data/BlockData.java +++ b/src/main/java/org/bukkit/block/data/BlockData.java @@ -22,6 +22,41 @@ public interface BlockData extends Cloneable { String getAsString(); /** + * Merges all explicitly set states from the given data with this BlockData. + * <br> + * Note that the given data MUST have been created from one of the String + * parse methods, e.g. {@link Server#createBlockData(java.lang.String)} and + * not have been subsequently modified. + * <br> + * Note also that the block types must match identically. + * + * @param data the data to merge from + * @return a new instance of this blockdata with the merged data + * @deprecated draft API + */ + @Deprecated + BlockData merge(BlockData data); + + /** + * Checks if the specified BlockData matches this block data. + * <br> + * The semantics of this method are such that for manually created or + * modified BlockData it has the same effect as + * {@link Object#equals(java.lang.Object)}, whilst for parsed data (that to + * which {@link #merge(org.bukkit.block.data.BlockData)} applies, it will + * return true when the type and all explicitly set states match. + * <br> + * <b>Note that these semantics mean that a.matches(b) may not be the same + * as b.matches(a)</b> + * + * @param data the data to match against (normally a parsed constant) + * @return if there is a match + * @deprecated draft API + */ + @Deprecated + boolean matches(BlockData data); + + /** * Returns a copy of this BlockData. * * @return a copy of the block data |