Handle all the amethyst growth.

Fixes #1889.
This commit is contained in:
wizjany 2022-03-20 08:26:41 -04:00
parent 216b061172
commit 938f0c3b66
No known key found for this signature in database
GPG Key ID: 1DB5861C03B76B5E
2 changed files with 9 additions and 1 deletions

View File

@ -588,7 +588,7 @@ public class WorldGuardBlockListener extends AbstractListener {
}
}
if (newType == Material.BUDDING_AMETHYST || newType == Material.POINTED_DRIPSTONE) {
if (Materials.isAmethystGrowth(newType) || newType == Material.POINTED_DRIPSTONE) {
if (wcfg.disableRockGrowth) {
event.setCancelled(true);
return;

View File

@ -1708,4 +1708,12 @@ public final class Materials {
}
return false;
}
public static boolean isAmethystGrowth(Material mat) {
return mat == Material.BUDDING_AMETHYST
|| mat == Material.AMETHYST_CLUSTER
|| mat == Material.LARGE_AMETHYST_BUD
|| mat == Material.MEDIUM_AMETHYST_BUD
|| mat == Material.SMALL_AMETHYST_BUD;
}
}