Advertisement
Guest User

Untitled

a guest
Jun 5th, 2013
48
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None
  1. @EventHandler
  2. public void onPlayerInteractBlock(PlayerInteractEvent evt){
  3. if(evt.getPlayer().getItemInHand().getTypeId() == Material.STICK.getId()){
  4. //maximal distance between player and thunder is 200 blocks
  5. evt.getPlayer().getWorld().strikeLightning(evt.getPlayer().getTargetBlock(null, 10).getLocation());
  6. if (evt.getAction() == Action.RIGHT_CLICK_BLOCK || evt.getAction() == Action.RIGHT_CLICK_AIR) {
  7. }
  8. }
  9. }
  10. }
Advertisement
RAW Paste Data Copied
Advertisement