Advertisement
Guest User

Untitled

a guest
Sep 9th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. @EventHandler
  2. public void onPlayerClicks(PlayerInteractEvent event) {
  3. Player player = event.getPlayer();
  4. Action action = event.getAction();
  5. ItemStack chest = new ItemStack(Material.CHEST, 1);
  6.  
  7. if (action.equals(Action.RIGHT_CLICK_AIR) || action.equals(Action.RIGHT_CLICK_BLOCK)) {
  8. if (player.getItemInHand().getType() == Material.CHEST) {
  9. Bukkit.broadcastMessage("§6§lLUCKYBLOCK§8 >§f O jogador §e" + player.getName() + " §fabriu uma luckyblock");
  10. player.getInventory().removeItem(chest);
  11. }
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement