Class BlockFactory
java.lang.Object
com.sk89q.worldedit.internal.registry.AbstractFactory<BaseBlock>
com.sk89q.worldedit.extension.factory.BlockFactory
A registry of known
BaseBlock
s. Provides methods to instantiate
new blocks from input.
Instances of this class can be taken from
WorldEdit.getBlockFactory()
.
-
Field Summary
Fields inherited from class com.sk89q.worldedit.internal.registry.AbstractFactory
worldEdit
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionparseFromListInput
(String input, ParserContext context) Return a set of blocks from a comma-delimited list of blocks.Methods inherited from class com.sk89q.worldedit.internal.registry.AbstractFactory
getParsers, getSuggestions, parseFromInput, register
-
Constructor Details
-
BlockFactory
Create a new instance.- Parameters:
worldEdit
- the WorldEdit instance.
-
-
Method Details
-
parseFromListInput
public Set<BaseBlock> parseFromListInput(String input, ParserContext context) throws InputParseException Return a set of blocks from a comma-delimited list of blocks.- Parameters:
input
- the inputcontext
- the context- Returns:
- a set of blocks
- Throws:
InputParseException
- thrown in error with the input
-