Reload announcements when reloading the config-file.

The announcements file loading method is renamed to indicate that it's also meant for re-loading, and the access modifier is changed from private to package-private to allow ArenaMasterImpl to call it.

Closes #462
This commit is contained in:
Andreas Troelsen 2018-06-16 18:04:06 +02:00
parent 61e9ac7635
commit a834246cbd
2 changed files with 3 additions and 2 deletions

View File

@ -696,6 +696,7 @@ public class ArenaMasterImpl implements ArenaMaster
config = plugin.getConfig();
initialize();
plugin.reloadSigns();
plugin.reloadAnnouncementsFile();
if (wasEnabled) setEnabled(true);
}

View File

@ -82,7 +82,7 @@ public class MobArena extends JavaPlugin
saveConfig();
// Initialize announcements-file
loadAnnouncementsFile();
reloadAnnouncementsFile();
// Load boss abilities
loadAbilities();
@ -201,7 +201,7 @@ public class MobArena extends JavaPlugin
}
}
private void loadAnnouncementsFile() {
void reloadAnnouncementsFile() {
// Create if missing
File file = new File(getDataFolder(), "announcements.yml");
try {