Skip to content

Reloading

DzusillCore supports hot-reload of all configurations and messages without restarting the server.

Any service that implements the Reloadable interface can be reloaded:

public interface Reloadable {
void reload() throws Exception;
}

Both ConfigManager and MessageService implement Reloadable.

The built-in ReloadSubCommand (part of CoreAdminCommand) does this:

@Override
public void run(CommandContext context, Arguments args) {
try {
configs.reload(); // reloads every registered Config and AbstractConfig
messages.reload(); // reloads messages.yml
context.reply(Messages.RELOAD_SUCCESS);
} catch (Exception ex) {
context.reply(Messages.RELOAD_FAILED);
}
}

In-game: /core reload (requires core.reload permission).

Register any typed config with ConfigManager so it is reloaded automatically:

ConfigManager configs = service(ConfigManager.class);
configs.register(new MyCustomConfig(plugin));

Or implement Reloadable in your own service and call reload() manually from the command.

  • Commands: registered at startup via CommandRegistry and persist for the plugin’s lifetime.
  • Listeners: registered once in ListenerRegistry and do not need reloading.
  • Database connections: the HikariCP pool is not restarted on reload. Credential changes require a plugin restart.

Defined in plugin.yml:

permissions:
core.reload:
description: Allows reloading the plugin configuration
default: op