class MaterialType implements WordType<Material> {

    @Override
    public Material parse(StringReader reader) throws CommandSyntaxException {
        var name = reader.readUnquotedString().toLowerCase();
        var material = MATERIALS.get(name);
        
        if (material == null) {
            throw EXCEPTION.createWithContext(reader, name);
        }
        
        return material;
    }

}