Skip to content

Commit

Permalink
Fixed generators not working in 1.8.8
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Feb 5, 2022
1 parent d69cb21 commit be6e026
Showing 1 changed file with 9 additions and 1 deletion.
Expand Up @@ -29,7 +29,7 @@ public final class GeneratorsListener implements Listener {
private static final Material BLUE_ICE_MATERIAL = getMaterialSafe("BLUE_ICE");
private static final Material SOUL_SOIL_MATERIAL = getMaterialSafe("SOUL_SOIL");
private static final Material BASALT_MATERIAL = getMaterialSafe("BASALT");
private static final Material LAVA_MATERIAL = getMaterialSafe("LAVA");
private static final Material LAVA_MATERIAL = getMaterialSafe("STATIONARY_LAVA", "LAVA");

private final SuperiorSkyblockPlugin plugin;
private final GeneratorsModule module;
Expand Down Expand Up @@ -164,5 +164,13 @@ private static Material getMaterialSafe(String material) {
}
}

private static Material getMaterialSafe(String material, String defaultMaterial) {
try {
return Material.valueOf(material);
} catch (IllegalArgumentException error) {
return Material.valueOf(defaultMaterial);
}
}


}

0 comments on commit be6e026

Please sign in to comment.