public void Handle(NetworkManager nm, Bot core) { if (!core.Entities.ContainsKey(PlayerId)) { core.RaiseErrorMessage("Protocol Warning: Despawned non-existant entity."); return; } var myEntity = core.Entities[PlayerId]; core.Entities.Remove(PlayerId); core.RaisePlayerLeft(myEntity); }