forked from fzorb/noThankYouMicrosoft
fix configuration reloading
This commit is contained in:
parent
04dcf23145
commit
c1c736a034
1 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ public final class NoThankYouMicrosoft extends JavaPlugin {
|
||||||
|
|
||||||
private static JavaPlugin instance;
|
private static JavaPlugin instance;
|
||||||
private static File databaseFile;
|
private static File databaseFile;
|
||||||
private static FileConfiguration databaseFileConfig;
|
private static YamlConfiguration databaseFileConfig;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
@ -37,8 +37,8 @@ public final class NoThankYouMicrosoft extends JavaPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void reReadDatabase() {
|
public static void reReadDatabase(JavaPlugin instance) {
|
||||||
databaseFile = new File(getDataFolder(), "database.yml");
|
File databaseFile = new File(instance.getDataFolder(), "database.yml");
|
||||||
databaseFileConfig = new YamlConfiguration();
|
databaseFileConfig = new YamlConfiguration();
|
||||||
try {
|
try {
|
||||||
databaseFileConfig.load(databaseFile);
|
databaseFileConfig.load(databaseFile);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue