mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-02 08:50:17 +01:00
Fixes #1729
This commit is contained in:
parent
9f9527d2e2
commit
f479a70594
@ -1017,7 +1017,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onBlockSpread(BlockFormEvent event) {
|
public void onBlockForm(BlockFormEvent event) {
|
||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
Location location = BukkitUtil.getLocation(block.getLocation());
|
Location location = BukkitUtil.getLocation(block.getLocation());
|
||||||
if (location.isPlotRoad()) {
|
if (location.isPlotRoad()) {
|
||||||
@ -1032,8 +1032,25 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Flags.SNOW_FORM.isFalse(plot)) {
|
switch (event.getNewState().getType()) {
|
||||||
event.setCancelled(true);
|
case SNOW:
|
||||||
|
case SNOW_BLOCK:
|
||||||
|
if (Flags.SNOW_FORM.isFalse(plot)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case ICE:
|
||||||
|
case FROSTED_ICE:
|
||||||
|
case PACKED_ICE:
|
||||||
|
if (Flags.ICE_FORM.isFalse(plot)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case STONE:
|
||||||
|
case OBSIDIAN:
|
||||||
|
case COBBLESTONE:
|
||||||
|
// TODO event ?
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user