3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 18:40:05 +01:00

Ensure BlockCategories are initialized.

We should probably have a way to initialize all these catalog classes ahead of time.
Dieser Commit ist enthalten in:
wizjany 2019-02-04 22:34:25 -05:00
Ursprung dddf2b963a
Commit cdd71178f5

Datei anzeigen

@ -26,6 +26,7 @@ import com.sk89q.worldedit.function.pattern.BlockPattern;
import com.sk89q.worldedit.function.pattern.Pattern; import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.function.pattern.RandomPattern; import com.sk89q.worldedit.function.pattern.RandomPattern;
import com.sk89q.worldedit.internal.registry.InputParser; import com.sk89q.worldedit.internal.registry.InputParser;
import com.sk89q.worldedit.world.block.BlockCategories;
import com.sk89q.worldedit.world.block.BlockCategory; import com.sk89q.worldedit.world.block.BlockCategory;
import com.sk89q.worldedit.world.block.BlockType; import com.sk89q.worldedit.world.block.BlockType;
@ -48,7 +49,7 @@ public class BlockCategoryPatternParser extends InputParser<Pattern> {
if(!input.startsWith("##")) { if(!input.startsWith("##")) {
return null; return null;
} }
BlockCategory category = BlockCategory.REGISTRY.get(input.substring(2).toLowerCase()); BlockCategory category = BlockCategories.get(input.substring(2).toLowerCase());
if (category == null) { if (category == null) {
throw new InputParseException("Unknown block tag: " + input.substring(2)); throw new InputParseException("Unknown block tag: " + input.substring(2));
} }