Advertisement
jezzye13

Nature

Mar 26th, 2015 (edited)
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1.     @EventHandler
  2.     public void onPlayerInteract(PlayerInteractEvent event) {
  3.         if(event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
  4.         Player player = event.getPlayer();
  5.            
  6.         if (event.getItem().equals({Itemstack})) {
  7.             Bukkit.dispatchCommand(player, {String command to execute});
  8.         }
  9.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement