From 0a0d19128cf18b3d88cf383522576823ca8a79fc Mon Sep 17 00:00:00 2001 From: themode Date: Mon, 4 Jan 2021 22:29:44 +0100 Subject: [PATCH] Added BlockManager#getCustomBlocks --- .../minestom/server/instance/block/BlockManager.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/net/minestom/server/instance/block/BlockManager.java b/src/main/java/net/minestom/server/instance/block/BlockManager.java index 379063e4a..9d55eec7b 100644 --- a/src/main/java/net/minestom/server/instance/block/BlockManager.java +++ b/src/main/java/net/minestom/server/instance/block/BlockManager.java @@ -5,6 +5,7 @@ import net.minestom.server.utils.validate.Check; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.Collection; import java.util.HashMap; import java.util.Map; @@ -93,4 +94,14 @@ public class BlockManager { return customBlocksInternalId[id]; } + /** + * Gets all the registered custom blocks. + * + * @return a {@link Collection} containing the registered custom blocks + */ + @NotNull + public Collection getCustomBlocks() { + return customBlocksId.values(); + } + }