Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onPlayerInteract(PlayerInteractEvent event) {
- if(event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
- Player player = event.getPlayer();
- if (event.getItem().equals({Itemstack})) {
- Bukkit.dispatchCommand(player, {String command to execute});
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement