Added BlockManager#getCustomBlocks

This commit is contained in:
themode 2021-01-04 22:29:44 +01:00
parent 5c2b7f38f6
commit 0a0d19128c

View File

@ -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<CustomBlock> getCustomBlocks() {
return customBlocksId.values();
}
}