Package com.plotsquared.core.util
Class BlockUtil
java.lang.Object
com.plotsquared.core.util.BlockUtil
BlockState related utility methods-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable BlockStatedeserialize(@NonNull Map<String, Object> map) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static @Nullable BlockStateget(int id) Get aBlockStatefrom a legacy idstatic @Nullable BlockStateget(int id, int data) Get aBlockStatefrom a legacy id-data pairstatic @Nullable BlockStateGet aBlockStatefrom its IDstatic @NonNull BlockState[]Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.
-
Method Details
-
get
Get aBlockStatefrom a legacy id- Parameters:
id- Legacy ID- Returns:
- Block state, or
null
-
get
Get aBlockStatefrom a legacy id-data pair- Parameters:
id- Legacy IDdata- Legacy data- Returns:
- Block state, or
null
-
get
Get aBlockStatefrom its ID- Parameters:
id- String or integer ID- Returns:
- Parsed block state, or
nullif none could be parsed
-
parse
@Deprecated(forRemoval=true, since="6.11.1") public static @NonNull BlockState[] parse(@NonNull String commaDelimited) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release.Parse a comma delimited list of block states- Parameters:
commaDelimited- List of block states- Returns:
- Parsed block states
-
deserialize
@Deprecated(forRemoval=true, since="6.11.1") public static @Nullable BlockState deserialize(@NonNull Map<String, Object> map) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release.Deserialize a serializedBlockState- Parameters:
map- Serialized block state- Returns:
- Deserialized block state, or
nullif the map is not a properly serialized block state
-