diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java index 0f1f2ab740..859e016e6c 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -19,6 +19,7 @@ public abstract class JavaPlugin implements Plugin { private final PluginDescriptionFile description; private final File dataFolder; private final ClassLoader classLoader; + private final Configuration config; /** * Constructs a new Java plugin instance @@ -39,6 +40,8 @@ public abstract class JavaPlugin implements Plugin { description = desc; dataFolder = folder; classLoader = cLoader; + config = new Configuration(new File(dataFolder, "config.yml")); + config.load(); } /** @@ -105,9 +108,6 @@ public abstract class JavaPlugin implements Plugin { * @return */ public Configuration getConfiguration() { - Configuration config = - new Configuration(new File(dataFolder, "config.yml")); - config.load(); return config; }