public Material getMaterial() {
        Material material = null;
        if (id != null) {
            material = Material.getMaterial(id);
        }
        if (material == null && name != null) {
            material = Material.getMaterial(name);
        }

        return material;
    }