Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onLegacyWeaponClick(PlayerInteractEvent event) {
- final Player player = event.getPlayer();
- if ((player.getInventory().getItemInHand().getType() == Material.IRON_AXE) &&
- (player.getItemInHand().getItemMeta().hasDisplayName()) &&
- ((event.getAction() == Action.RIGHT_CLICK_AIR) || (event.getAction() == Action.RIGHT_CLICK_BLOCK)) &&
- (player.getItemInHand().getItemMeta().getDisplayName().equalsIgnoreCase(ChatColor.RED + "Hyper Axe"))) {
- player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED,
- 0, 20));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement