private static bool RemoveFromFaction_Internal(MyIdentity identity) { var fac = MySession.Static.Factions.GetPlayerFaction(identity.IdentityId); if (fac == null) { return(false); } /* * VisualScriptLogicProvider takes care of removal of faction if last * identity is kicked, and promotes the next player in line to Founder * if the founder is being kicked. * * Factions must have a founder otherwise calls like MyFaction.Members.Keys will NRE. */ MyVisualScriptLogicProvider.KickPlayerFromFaction(identity.IdentityId); return(true); }