#450 Make reload & messages functionality use NewSetting

- Change ReloadCommand to use the new setting functionality
- Check and construct the messages file in NewSetting
- Unrelated: change MessagesManager not to extend CustomConfiguration anymore
This commit is contained in:
ljacqu
2016-01-31 09:55:02 +01:00
parent 059175f14e
commit e747dfeb7f
11 changed files with 185 additions and 123 deletions
@@ -1,6 +1,5 @@
package fr.xephi.authme.output;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.util.WrapperMock;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -37,15 +36,12 @@ public class MessagesIntegrationTest {
public void setUpMessages() {
WrapperMock.createInstance();
Settings.messagesLanguage = "en";
URL url = getClass().getClassLoader().getResource(YML_TEST_FILE);
if (url == null) {
throw new RuntimeException("File '" + YML_TEST_FILE + "' could not be loaded");
}
Settings.messageFile = new File(url.getFile());
Settings.messagesLanguage = "en";
messages = Messages.getInstance();
messages = new Messages(new File(url.getFile()));
}
@Test