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:
@@ -696,6 +696,7 @@ public class ArenaMasterImpl implements ArenaMaster
|
|||||||
config = plugin.getConfig();
|
config = plugin.getConfig();
|
||||||
initialize();
|
initialize();
|
||||||
plugin.reloadSigns();
|
plugin.reloadSigns();
|
||||||
|
plugin.reloadAnnouncementsFile();
|
||||||
if (wasEnabled) setEnabled(true);
|
if (wasEnabled) setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class MobArena extends JavaPlugin
|
|||||||
saveConfig();
|
saveConfig();
|
||||||
|
|
||||||
// Initialize announcements-file
|
// Initialize announcements-file
|
||||||
loadAnnouncementsFile();
|
reloadAnnouncementsFile();
|
||||||
|
|
||||||
// Load boss abilities
|
// Load boss abilities
|
||||||
loadAbilities();
|
loadAbilities();
|
||||||
@@ -201,7 +201,7 @@ public class MobArena extends JavaPlugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadAnnouncementsFile() {
|
void reloadAnnouncementsFile() {
|
||||||
// Create if missing
|
// Create if missing
|
||||||
File file = new File(getDataFolder(), "announcements.yml");
|
File file = new File(getDataFolder(), "announcements.yml");
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user