kokumaji / warrior-plugin

1 stars 0 forks source link

Language Config not updating on Reload #2

Closed kokumaji closed 3 years ago

kokumaji commented 3 years ago

Is your feature request related to a problem? Please describe. When executing /warrior reload language the language config isn't updated across the entire plugin, despite setting the config of a static Translator object in the plugins main class. Currently, the workaround is to pull the config every time a String is being formatted. This heavily impacts performance and may not be optimal.

Describe the solution you'd like Ideally, the Translator object should have a static YAML config object which is only updated when executing /warrior reload language, to improve the overall performance. Methods such as Translator#setLanguageFile(File) have been tested, although without success.

spazzylemons commented 3 years ago

Appears to be due to DefaultMessages not being updated on language reload