Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onPlayerInteractBlock(PlayerInteractEvent evt){
- if(evt.getPlayer().getItemInHand().getTypeId() == Material.STICK.getId()){
- //maximal distance between player and thunder is 200 blocks
- evt.getPlayer().getWorld().strikeLightning(evt.getPlayer().getTargetBlock(null, 10).getLocation());
- if (evt.getAction() == Action.RIGHT_CLICK_BLOCK || evt.getAction() == Action.RIGHT_CLICK_AIR) {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement