Heads up!
Added in Fzzy Config 0.4.0
@RequiresAction
indicates that the user will need to take a certain action if a relevant field is changed in order for the change to take full effect. The actions are prioritized based on their Enum ordinal; you can annotate a class with a certain action, but upgrade certain settings with a separate annotation of higher priority.
The available actions, from highest to lowest priority
RESTART
: Same action as. Prompts that a restart is needed, and will disconnect clients joining a server with a synced RESTART, prompting them to restart their client after the sync to apply the changes.@RequiresRestart
RELOG
: The user needs to disconnect and reconnect to their current world or server for changes to take effect.RELOAD_BOTH
: Both data packs and assets need to be reloaded.RELOAD_DATA
: Data packs need to be reloaded.RELOAD_RESOURCES
: Resource packs need to be reloaded.
@RequiresAction(action = Action.RESTART)public int myItemDurability = 250; // something like item durability would require a restart, as durabilities are immutable once an item is instantiated.@RequiresAction(action = Action.RELOAD_RESOURCES)public Identifier guiTheme = Identifier.of(MOD_ID, "default_theme"); // some sort of reloadable theme selector, that needs to reload resources to apply the new theme.
If Action.RESTART
is used, a connecting client will see the same restart screen as shown with @RequiresRestart
Heads up!
See the documentation page here 🗗