private void HandleEntRemoveReq(EntityUid entityUid) { //TODO: Some form of admin check if (_entityManager.TryGetEntity(entityUid, out var entity)) { _entityManager.DeleteEntity(entity); } }
public void HandleAdminMessage(NetMessage adminMsgType, NetIncomingMessage messageBody) { switch (adminMsgType) { case NetMessage.RequestEntityDeletion: int entId = messageBody.ReadInt32(); //if ( // IoCManager.Resolve<IPlayerManager>().GetSessionByConnection(messageBody.SenderConnection). // adminPermissions.isAdmin || true) //TEMPORARY. REMOVE THE 'TRUE' LATER ON. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! //{ IEntity delEnt = EntityManager.GetEntity(entId); if (delEnt != null) { EntityManager.DeleteEntity(delEnt); } //} break; } }