mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +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)
|
||||
public void onBlockSpread(BlockFormEvent event) {
|
||||
public void onBlockForm(BlockFormEvent event) {
|
||||
Block block = event.getBlock();
|
||||
Location location = BukkitUtil.getLocation(block.getLocation());
|
||||
if (location.isPlotRoad()) {
|
||||
@ -1032,9 +1032,26 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||
if (plot == null) {
|
||||
return;
|
||||
}
|
||||
switch (event.getNewState().getType()) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
|
Loading…
Reference in New Issue
Block a user