mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-28 03:57:50 +01:00
Added BlockManager#getCustomBlocks
This commit is contained in:
parent
5c2b7f38f6
commit
0a0d19128c
@ -5,6 +5,7 @@ import net.minestom.server.utils.validate.Check;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -93,4 +94,14 @@ public class BlockManager {
|
|||||||
return customBlocksInternalId[id];
|
return customBlocksInternalId[id];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all the registered custom blocks.
|
||||||
|
*
|
||||||
|
* @return a {@link Collection} containing the registered custom blocks
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
public Collection<CustomBlock> getCustomBlocks() {
|
||||||
|
return customBlocksId.values();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user