Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onInteract(PlayerInteractEvent event){
- Block block = event.getClickedBlock();
- Action action = event.getAction();
- Player p = event.getPlayer();
- if((action == Action.LEFT_CLICK_BLOCK) && (block.getType().equals(Material.OBSIDIAN))){
- if(p.getItemInHand().getType().equals(Material.DIAMOND_PICKAXE)){
- p.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 160, 3));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement