private static void SendAddSystemObjectServer(MySystemObject obj, Guid parentId, ulong callbackId, ulong clientId) { MyPluginLog.Log("Server: Add object " + obj.DisplayName + " to system"); if (obj != null) { if (!Static.StarSystem.ObjectExists(obj.Id)) { var parent = Static.StarSystem.GetObjectById(parentId); if (parent != null) { parent.ChildObjects.Add(obj); obj.ParentId = parentId; PluginEventHandler.Static.RaiseStaticEvent(SendSimpleActionCallbackClient, true, callbackId, clientId); } else { Static.StarSystem.CenterObject.ChildObjects.Add(obj); obj.ParentId = Static.StarSystem.CenterObject.Id; PluginEventHandler.Static.RaiseStaticEvent(SendSimpleActionCallbackClient, true, callbackId, clientId); } Static.AddAllPersistentGps(); return; } } PluginEventHandler.Static.RaiseStaticEvent(SendSimpleActionCallbackClient, false, callbackId, clientId); }