#450 Port usages of Settings#set(), #setValue() to NewSettings

This commit is contained in:
ljacqu
2016-01-30 15:12:26 +01:00
parent 724296e02b
commit 059175f14e
5 changed files with 73 additions and 76 deletions
@@ -36,17 +36,19 @@ public class FlatFile implements DataSource {
private final File source;
public FlatFile() {
source = Settings.AUTH_FILE;
AuthMe instance = AuthMe.getInstance();
source = new File(instance.getDataFolder(), "auths.db");
try {
source.createNewFile();
} catch (IOException e) {
ConsoleLogger.showError(e.getMessage());
if (Settings.isStopEnabled) {
ConsoleLogger.showError("Can't use FLAT FILE... SHUTDOWN...");
AuthMe.getInstance().getServer().shutdown();
instance.getServer().shutdown();
}
if (!Settings.isStopEnabled) {
AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
instance.getServer().getPluginManager().disablePlugin(instance);
}
e.printStackTrace();
}