# Lifecycle Events

Lifecycle events describe the main stages of the OMS runtime.

They are used to notify addons, feature managers, and features about initialization, ticking, and shutdown.

***

### Core Types

#### OMSLifecycle

`OMSLifecycle` is the base type for lifecycle events.

{% @github-files/github-code-block url="<https://github.com/c0nnor263/OperateMyServer/blob/main/oms-api/src/main/kotlin/io/conboi/oms/api/event/OMSLifecycle.kt>" %}

***

#### Addon.RegisterEvent

`Addon.RegisterEvent` opens the addon registration phase.

***

#### StartingEvent

`StartingEvent` is fired when OMS initialization begins.

***

#### TickingEvent

`TickingEvent` is fired during server ticking.

***

#### StoppingEvent

`StoppingEvent` is fired when the server is stopping.

***

### Notes

* Lifecycle events describe runtime state
* They are dispatched by OMS during initialization and execution
* Features typically react to them through the `FeatureManager`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://conboi.gitbook.io/oms-wiki/developer-guide/core-architecture/events/lifecycle-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
