Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. @EventHandler
  2. public void onInteract(PlayerInteractEvent event){
  3. Block block = event.getClickedBlock();
  4. Action action = event.getAction();
  5. Player p = event.getPlayer();
  6. if((action == Action.LEFT_CLICK_BLOCK) && (block.getType().equals(Material.OBSIDIAN))){
  7. if(p.getItemInHand().getType().equals(Material.DIAMOND_PICKAXE)){
  8. p.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 160, 3));
  9. }
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement