CloneableAgeable, AnaloguePowerable, Attachable, Bamboo, Bed, Beehive, Bell, Bisected, BrewingStand, BubbleColumn, Cake, Campfire, Chest, Cocoa, CommandBlock, Comparator, CoralWallFan, DaylightDetector, Directional, Dispenser, Door, EnderChest, EndPortalFrame, FaceAttachable, Farmland, Fence, Fire, Furnace, Gate, GlassPane, Grindstone, Hopper, Jukebox, Ladder, Lantern, Leaves, Lectern, Levelled, Lightable, MultipleFacing, NoteBlock, Observer, Openable, Orientable, Piston, PistonHead, Powerable, Rail, RedstoneRail, RedstoneWallTorch, RedstoneWire, Repeater, Rotatable, Sapling, Scaffolding, SeaPickle, Sign, Slab, Snow, Snowable, Stairs, StructureBlock, Switch, TechnicalPiston, TNT, TrapDoor, Tripwire, TripwireHook, TurtleEgg, WallSign, Waterloggedpublic interface BlockData extends Cloneable
| Modifier and Type | Method | Description | 
|---|---|---|
| @NotNull BlockData | clone() | Returns a copy of this BlockData. | 
| @NotNull String | getAsString() | Gets a string, which when passed into a method such as
  Server.createBlockData(java.lang.String)will unambiguously
 recreate this instance. | 
| @NotNull String | getAsString(boolean hideUnspecified) | Gets a string, which when passed into a method such as
  Server.createBlockData(java.lang.String)will recreate this or a
 similar instance where unspecified states (if any) may be optionally
 omitted. | 
| @NotNull Material | getMaterial() | Get the Material represented by this block data. | 
| boolean | matches(@Nullable BlockData data) | Checks if the specified BlockData matches this block data. | 
| @NotNull BlockData | merge(@NotNull BlockData data) | Merges all explicitly set states from the given data with this BlockData. | 
@NotNull @NotNull Material getMaterial()
@NotNull @NotNull String getAsString()
Server.createBlockData(java.lang.String) will unambiguously
 recreate this instance.@NotNull @NotNull String getAsString(boolean hideUnspecified)
Server.createBlockData(java.lang.String) will recreate this or a
 similar instance where unspecified states (if any) may be optionally
 omitted. If this instance was parsed and states are omitted, this exact
 instance will be creatable when parsed again, else their equality cannot
 be guaranteed.
 
 This method will only take effect for BlockData instances created by
 methods such as Server.createBlockData(String) or any similar
 method whereby states are optionally defined. If otherwise, the result of
 getAsString() will be returned. The following behaviour would be
 expected:
 
 String dataString = "minecraft:chest[waterlogged=true]"
 BlockData data = Bukkit.createBlockData(dataString);
 dataString.equals(data.getAsString(true)); // This would return true
 dataString.equals(data.getAsString(false)); // This would return false as all states are present
 dataString.equals(data.getAsString()); // This is equivalent to the above, "getAsString(false)"
 hideUnspecified - true if unspecified states should be omitted,
 false if they are to be shown as performed by getAsString().@NotNull @NotNull BlockData merge(@NotNull @NotNull BlockData data)
Server.createBlockData(java.lang.String) and
 not have been subsequently modified.
 data - the data to merge fromboolean matches(@Nullable
                @Nullable BlockData data)
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.
 data - the data to match against (normally a parsed constant)@NotNull @NotNull BlockData clone()
Copyright © 2020. All rights reserved.