mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Documented #retrieve()
Credits: @Poslovitch
This commit is contained in:
parent
9f0796327b
commit
17cc989012
@ -246,6 +246,15 @@ public class BlockStorage {
|
|||||||
addBlockInfo(block, "id", item, true);
|
addBlockInfo(block, "id", item, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the SlimefunItem's ItemStack from the specified Block.
|
||||||
|
* If the specified Block is registered in BlockStorage, its data will be erased from it, regardless of the returned value.
|
||||||
|
*
|
||||||
|
* @param block the block to retrieve the ItemStack from
|
||||||
|
* @return the SlimefunItem's ItemStack corresponding to the block if it has one, otherwise null
|
||||||
|
*
|
||||||
|
* @since 4.0
|
||||||
|
*/
|
||||||
public static ItemStack retrieve(Block block) {
|
public static ItemStack retrieve(Block block) {
|
||||||
if (!hasBlockInfo(block)) return null;
|
if (!hasBlockInfo(block)) return null;
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user