diff --git a/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java b/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java index 3849e1e4..b1621418 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java +++ b/eco-api/src/main/java/com/willfp/eco/core/EcoPlugin.java @@ -305,8 +305,8 @@ public abstract class EcoPlugin extends JavaPlugin { this.logger = Eco.getHandler().createLogger(this); this.proxyFactory = this.proxyPackage.equalsIgnoreCase("") ? null : Eco.getHandler().createProxyFactory(this); - this.langYml = new LangYml(this); - this.configYml = new ConfigYml(this); + this.langYml = this.createLangYml(); + this.configYml = this.createConfigYml(); Eco.getHandler().addNewPlugin(this); } @@ -571,6 +571,28 @@ public abstract class EcoPlugin extends JavaPlugin { */ protected abstract List loadListeners(); + /** + * Useful for custom LangYml implementations. + *

+ * Override if needed. + * + * @return lang.yml. + */ + protected LangYml createLangYml() { + return new LangYml(this); + } + + /** + * Useful for custom ConfigYml implementations. + *

+ * Override if needed. + * + * @return config.yml. + */ + protected ConfigYml createConfigYml() { + return new ConfigYml(this); + } + /** * Create the display module for the plugin. *