mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-09 09:17:39 +00:00
Ensure BlockCategories are initialized.
We should probably have a way to initialize all these catalog classes ahead of time.
This commit is contained in:
parent
dddf2b963a
commit
cdd71178f5
@ -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));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user