mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 03:35:11 +01:00
Revert "Explicitly set user for break blocks listener"
This reverts commit 5beeb97f99
.
This commit is contained in:
parent
bcb1a3ae24
commit
28c89ff814
@ -6,6 +6,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import world.bentobox.bentobox.api.flags.FlagListener;
|
||||
@ -262,4 +263,13 @@ public class BlockInteractionListener extends FlagListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevents blocks that are protected from being broken, which would bypass the protection
|
||||
*
|
||||
* @param e - event
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
public void onBlockBreak(final BlockBreakEvent e) {
|
||||
checkClickedBlock(e, e.getBlock().getLocation(), e.getBlock().getType());
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class BreakBlocksListener extends FlagListener {
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
public void onBlockBreak(final BlockBreakEvent e) {
|
||||
setUser(User.getInstance(e.getPlayer())).checkIsland(e, e.getBlock().getLocation(), Flags.BREAK_BLOCKS);
|
||||
checkIsland(e, e.getBlock().getLocation(), Flags.BREAK_BLOCKS);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user