Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void BlockBreak(BlockBreakEvent e) {
- Player p = e.getPlayer();
- if (p.getGameMode() != GameMode.CREATIVE) {
- e.setCancelled(true);
- } else {
- e.setCancelled(false);
- }
- double sx = -1;
- double sz = -1;
- double ex = 1;
- double ez = 1;
- double bx = e.getBlock().getLocation().getX();
- double bz = e.getBlock().getLocation().getZ();
- if(bx <= ex && bx >= sx && bz <= sz && bz >= ez){
- e.setCancelled(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement