Skip to content

Ignore config.yaml and translations.yaml when plugin asks it #798

@sunnamed434

Description

@sunnamed434

I create config on my own without IConfiguration and its API, I use SerializerBuilder and DeserializerBuilder because I have a 3 different implementations of my plugin (OpenMod, RocketMod, Vanilla), and to don't make the config duplications I made 1 C# model (class) and the same with translations to solve problem in one single place, but when I use config.yaml and translations.yaml as file names, openmod fires an event when config updated, etc

OpenMod also cause an exception when trying to deserialize my config.yaml and translations.yaml however, without success, so, this forces me to create a plugin-config.yaml and plugin-translations.yaml, to suppress those issues as a temp solution, I don't want to stay with plugin- prefix because for a user its hard to understand that this is config or translations of the plugin, because it's more known for everyone (users of openmod) that config is config.yaml and translations if translations.yaml

I suggest making a plugin.yaml file as an embedded resource in the plugin with all configuration settings for the OpenMod when activating the plugin, as an example I made this simple config:

plugin.yaml

plugin:
  ignoreConfiguration: true
  ignoreTranslations: true

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions