Injecting placeholders now clears config cache

This commit is contained in:
Auxilor
2022-03-11 16:29:05 +00:00
parent 00df39097c
commit e47c6387a2
2 changed files with 4 additions and 0 deletions

View File

@@ -211,6 +211,7 @@ open class EcoJSONConfigWrapper : JSONConfig {
override fun injectPlaceholders(placeholders: Iterable<StaticPlaceholder>) {
injections.removeIf { placeholders.any { placeholder -> it.identifier == placeholder.identifier } }
injections.addAll(placeholders)
this.clearCache()
}
override fun getInjectedPlaceholders(): List<StaticPlaceholder> {
@@ -219,6 +220,7 @@ open class EcoJSONConfigWrapper : JSONConfig {
override fun clearInjectedPlaceholders() {
injections.clear()
this.clearCache()
}
override fun getType(): ConfigType {

View File

@@ -230,6 +230,7 @@ open class EcoYamlConfigWrapper<T : ConfigurationSection> : Config {
override fun injectPlaceholders(placeholders: Iterable<StaticPlaceholder>) {
injections.removeIf { placeholders.any { placeholder -> it.identifier == placeholder.identifier } }
injections.addAll(placeholders)
this.clearCache()
}
override fun getInjectedPlaceholders(): List<StaticPlaceholder> {
@@ -238,6 +239,7 @@ open class EcoYamlConfigWrapper<T : ConfigurationSection> : Config {
override fun clearInjectedPlaceholders() {
injections.clear()
this.clearCache()
}
override fun getType(): ConfigType {