---
title: "@RequiresRestart"
---

<Callout variant="danger">
Deprecated as of 0.4.0. Use <a href="Requires-Action"><code>@RequiresAction</code></a> instead
</Callout>

~~`@RequiresRestart`~~ indicates that a marked field (or every field within a marked class) will need the client and/or server restarted in order for changes to take effect. If the user makes a change that requires a restart, they will be prompted in the chat menu, and a server log message will be printed. If a client joins to a server and the client finds that there are `@RequiresRestart` fields that don't match to the servers incoming config synchronization, they will be disconnected and prompted to either restart or go back to the main menu.

<CodeTabs>

```java !!tabs Java
@RequiresRestart
public int myItemDurability = 250; // something like item durability would require a restart, as durabilities are immutable once an item is instantiated.
```

```kotlin !!tabs Kotlin
@RequiresRestart
var myItemDurability = 250 // something like item durability would require a restart, as durabilities are immutable once an item is instantiated.
```

</CodeTabs>

The screen show to clients if they joined with un-synced configs with differences that require a restart. Configs have been synced by this time, so when they restart and rejoin, the screen will not appear again.

![image](https://github.com/fzzyhmstrs/fconfig/assets/72876796/e3c43b81-b78b-440a-bb88-a682a19d27ea)

<Callout>
See the documentation page <a target="_blank" rel="noopener" href="https://fzzyhmstrs.github.io/fconfig/-fzzy%20-config/me.fzzyhmstrs.fzzy_config.annotations/-requires-restart/index.html">here 🗗</a>
</Callout>