mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-07 22:27:34 +01:00
Added EnchantmentConfig#save
This commit is contained in:
parent
f148121981
commit
8f1873e3eb
@ -120,13 +120,24 @@ public class EnchantmentConfig extends ConfigWrapper<Config> {
|
|||||||
this.getPlugin().getLangYml().set("enchantments." + this.getEnchant().getKey().getKey(), null);
|
this.getPlugin().getLangYml().set("enchantments." + this.getEnchant().getKey().getKey(), null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (this.getHandle() instanceof LoadableConfig loadableConfig) {
|
this.save();
|
||||||
loadableConfig.save();
|
|
||||||
}
|
|
||||||
this.getPlugin().getLangYml().save();
|
this.getPlugin().getLangYml().save();
|
||||||
this.getPlugin().getLangYml().clearCache();
|
this.getPlugin().getLangYml().clearCache();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save if savable config.
|
||||||
|
*/
|
||||||
|
public void save() {
|
||||||
|
try {
|
||||||
|
if (this.getHandle() instanceof LoadableConfig loadableConfig) {
|
||||||
|
loadableConfig.save();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user