mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
replace usages of snow tag
This commit is contained in:
parent
aeb4350ccb
commit
ec51a60d80
@ -121,6 +121,11 @@ public class BlockEventListener implements Listener {
|
||||
Material.TURTLE_EGG,
|
||||
Material.TURTLE_SPAWN_EGG
|
||||
);
|
||||
private static final Set<Material> SNOW = Set.of( // needed as Tag.SNOW isn't present in 1.16.5
|
||||
Material.SNOW,
|
||||
Material.SNOW_BLOCK,
|
||||
Material.POWDER_SNOW
|
||||
);
|
||||
private final PlotAreaManager plotAreaManager;
|
||||
private final WorldEdit worldEdit;
|
||||
|
||||
@ -529,7 +534,7 @@ public class BlockEventListener implements Listener {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (Tag.SNOW.isTagged(event.getNewState().getType())) {
|
||||
if (SNOW.contains(event.getNewState().getType())) {
|
||||
if (!plot.getFlag(SnowFormFlag.class)) {
|
||||
plot.debug("Snow could not form because snow-form = false");
|
||||
event.setCancelled(true);
|
||||
@ -561,7 +566,7 @@ public class BlockEventListener implements Listener {
|
||||
return;
|
||||
}
|
||||
Class<? extends BooleanFlag<?>> flag;
|
||||
if (Tag.SNOW.isTagged(event.getNewState().getType())) {
|
||||
if (SNOW.contains(event.getNewState().getType())) {
|
||||
flag = SnowFormFlag.class;
|
||||
} else if (Tag.ICE.isTagged(event.getNewState().getType())) {
|
||||
flag = IceFormFlag.class;
|
||||
@ -678,7 +683,7 @@ public class BlockEventListener implements Listener {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (Tag.SNOW.isTagged(blockType)) {
|
||||
if (SNOW.contains(blockType)) {
|
||||
if (!plot.getFlag(SnowMeltFlag.class)) {
|
||||
plot.debug("Snow could not melt because snow-melt = false");
|
||||
event.setCancelled(true);
|
||||
|
Loading…
Reference in New Issue
Block a user