Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onInteract(PlayerInteractEvent pie){
- Player player = pie.getPlayer();
- if(pie.getAction().equals(Action.RIGHT_CLICK_BLOCK)){
- if(player.getInventory().getItemInHand().getType().equals(Material.BLAZE_ROD)){
- pie.setCancelled();
- Location loc = player.getTargetBlock(null, 99999).getLocation();
- player.teleport(loc);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement