Skip to content

Commit 840ef5d

Browse files
authored
Preserve vanilla drop behavior when tile-drop flag is applied (#4793)
make tile-drop flag respect vanilla willDrop=false
1 parent 92db046 commit 840ef5d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Bukkit/src/main/java/com/plotsquared/bukkit/listener/PaperListener.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ public void onBlockDestroy(final BlockDestroyEvent event) {
104104
}
105105
Plot plot = area.getPlot(location);
106106
if (plot != null) {
107+
// Prevent dropping blocks which normally would not be dropped.
108+
if (!event.willDrop()) {
109+
return;
110+
}
107111
event.setWillDrop(plot.getFlag(TileDropFlag.class));
108112
}
109113
}

0 commit comments

Comments
 (0)