Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void hand(PlayerInteractEvent e) {
- Player player = e.getPlayer();
- if (e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
- if (player.getItemInHand() != null) {
- if(player.getItemInHand().getItemMeta().getDisplayName().equals(ChatColor.GOLD + "Feather of the gods")) {
- player.sendMessage(ChatColor.GOLD + "You feel the gods sending you power.");
- player.setAllowFlight(true);
- player.setFlying(true);
- player.getWorld().playSound(player.getLocation(), Sound.AMBIENCE_THUNDER, 1, 1);
- } else {
- player.setAllowFlight(false);
- player.setFlying(false);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement