Added EnchantmentConfig#save
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user