private static void Kick(YiObj player, ref MsgTeam packet) { if (!TeamSystem.Teams.ContainsKey(player.UniqueId)) { return; } if (!TeamSystem.Teams[player.UniqueId].Members.ContainsKey(packet.TargetUniqueId)) { return; } if (!TeamSystem.Teams[player.UniqueId].Members.TryGetValue(packet.TargetUniqueId, out var kick)) { return; } TeamSystem.Leave(player, kick); }