Preserve vanilla drop behavior when tile-drop flag is applied (#4793)

make tile-drop flag respect vanilla willDrop=false
This commit is contained in:
linus
2025-11-16 01:36:20 +01:00
committed by GitHub
parent 92db0467b1
commit 840ef5d236

View File

@@ -104,6 +104,10 @@ public class PaperListener implements Listener {
} }
Plot plot = area.getPlot(location); Plot plot = area.getPlot(location);
if (plot != null) { if (plot != null) {
// Prevent dropping blocks which normally would not be dropped.
if (!event.willDrop()) {
return;
}
event.setWillDrop(plot.getFlag(TileDropFlag.class)); event.setWillDrop(plot.getFlag(TileDropFlag.class));
} }
} }