Saving and Loading Widgets
The getWidgetsFile()
method retrieves a File where widgets should be saved and loaded. It can be overridden to specify the file instance from which DynamicHUD will load and save your mod's widgets.
Version 3.0.0
onwards, DynamicHUD automates saving via DynamicHudConfigurator.setupSaveEvents
, triggered on events like server stop or player disconnect.
@Override
public File getWidgetsFile() {
return new File(FILE_DIRECTORY, "mymod_widgets.nbt");
}
Last updated
Was this helpful?