powder snow is 1.17+

This commit is contained in:
SirYwell 2022-08-04 16:36:24 +02:00
parent ec51a60d80
commit 59a8fe5d6f

View File

@ -121,11 +121,23 @@ public class BlockEventListener implements Listener {
Material.TURTLE_EGG, Material.TURTLE_EGG,
Material.TURTLE_SPAWN_EGG Material.TURTLE_SPAWN_EGG
); );
private static final Set<Material> SNOW = Set.of( // needed as Tag.SNOW isn't present in 1.16.5 private static final Set<Material> SNOW; // needed as Tag.SNOW isn't present in 1.16.5
static {
if (PlotSquared.platform().serverVersion()[1] < 17) {
SNOW = Set.of(
Material.SNOW,
Material.SNOW_BLOCK
);
} else {
SNOW = Set.of(
Material.SNOW, Material.SNOW,
Material.SNOW_BLOCK, Material.SNOW_BLOCK,
Material.POWDER_SNOW Material.POWDER_SNOW // only since 1.17
); );
}
}
private final PlotAreaManager plotAreaManager; private final PlotAreaManager plotAreaManager;
private final WorldEdit worldEdit; private final WorldEdit worldEdit;