@Override
    public void onPlayerInteract (PlayerInteractEvent event) {
        
        if(event.isCancelled()) {
            return;
        }
        
        long cooldown = 0;
        Date currentDate = new Date();         
        Player player = event.getPlayer(); 
        int weaponID = player.getItemInHand().getTypeId();      
        Action action = event.getAction();
        
        if(Properties.confCooldowns.get(weaponID) == null) {
            return;
        }
        
        
        if(weaponID == 261) {
            return;       
        }        
        else if(Properties.confCooldowns.get(weaponID) == null || (Properties.cooldown_on_damages_only) || 
                (action != Action.LEFT_CLICK_BLOCK && action != Action.LEFT_CLICK_AIR)) {
            return;
        }
        else {
            // Other weapons
            
            PlayerData playerData = Users.getPlayerData(player);
            
            if(playerData.getUsedWeapon() > currentDate.getTime()) {
                return;
            }
            
            
            cooldown = Properties.confCooldowns.get(weaponID);
            if(!player.hasPermission("advancedpvp.nocooldown")) {
                playerData.setUsedWeapon((currentDate.getTime() + cooldown));
            }
        }        
    }