mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-06 22:17:40 +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);
|
||||
|
||||
try {
|
||||
if (this.getHandle() instanceof LoadableConfig loadableConfig) {
|
||||
loadableConfig.save();
|
||||
}
|
||||
this.save();
|
||||
this.getPlugin().getLangYml().save();
|
||||
this.getPlugin().getLangYml().clearCache();
|
||||
} catch (IOException e) {
|
||||
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