Exemplo n.º 1
0
        private void handleClanKick(Player player, Packet packet)
        {
            long name = packet.readLong();

            if (name < 0)
            {
                return;
            }
            Clan clan = Server.getClanManager().getClanByPlayer(player);

            if (clan != null)
            {
                ClanUser user = clan.getUserByName(player.getLoginDetails().getUsername());
                if (user != null)
                {
                    if (user.getClanRights() < clan.getKickRights())
                    {
                        player.getPackets().sendMessage("You do not have a high enough rank to kick users from this clan chat.");
                        return;
                    }
                    clan.kickUser(name);
                }
            }
        }