mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
feat: introduce a flag section into the config for instabreak (#4368)
* Added and applied config * removed wrong return logic
This commit is contained in:
@ -670,7 +670,11 @@ public class BlockEventListener implements Listener {
|
||||
BlockBreakEvent call = new BlockBreakEvent(block, player);
|
||||
Bukkit.getServer().getPluginManager().callEvent(call);
|
||||
if (!call.isCancelled()) {
|
||||
event.getBlock().breakNaturally();
|
||||
if (Settings.Flags.INSTABREAK_CONSIDER_TOOL) {
|
||||
block.breakNaturally(event.getItemInHand());
|
||||
} else {
|
||||
block.breakNaturally();
|
||||
}
|
||||
}
|
||||
}
|
||||
// == rather than <= as we only care about the "ground level" not being destroyed
|
||||
|
Reference in New Issue
Block a user