mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-09 04:02:10 +01:00
I hope I didn't made only shit (pls check this)
This commit is contained in:
parent
edd77fe0a6
commit
1bde8729ee
@ -10,7 +10,6 @@ import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.Utils;
|
||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.cache.backup.FileCache;
|
||||
import fr.xephi.authme.cache.limbo.LimboCache;
|
||||
import fr.xephi.authme.cache.limbo.LimboPlayer;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
@ -25,7 +24,6 @@ public class AsyncronousQuit {
|
||||
protected Player p;
|
||||
protected Utils utils = Utils.getInstance();
|
||||
private String name;
|
||||
private FileCache playerBackup;
|
||||
private ItemStack[] armor = null;
|
||||
private ItemStack[] inv = null;
|
||||
private boolean isOp = false;
|
||||
@ -39,7 +37,6 @@ public class AsyncronousQuit {
|
||||
this.plugin = plugin;
|
||||
this.database = database;
|
||||
this.name = p.getName().toLowerCase();
|
||||
this.playerBackup = new FileCache(plugin);
|
||||
this.isKick = isKick;
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,9 @@
|
||||
package fr.xephi.authme.settings;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.ConsoleLogger;
|
||||
|
||||
public class Messages extends CustomConfiguration {
|
||||
@ -27,13 +24,11 @@ public class Messages extends CustomConfiguration {
|
||||
* @param filename
|
||||
* The filename to open
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public final void loadDefaults(File file) {
|
||||
InputStream stream = AuthMe.getInstance().getResource(file.getName());
|
||||
if (stream == null)
|
||||
if (file.exists())
|
||||
return;
|
||||
|
||||
setDefaults(YamlConfiguration.loadConfiguration(stream));
|
||||
setDefaults(YamlConfiguration.loadConfiguration(file));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7,7 +7,6 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -102,7 +101,7 @@ public final class Settings extends YamlConfiguration {
|
||||
if (exists()) {
|
||||
load();
|
||||
} else {
|
||||
loadDefaults(file.getName());
|
||||
loadDefaults(file);
|
||||
load();
|
||||
}
|
||||
configFile = (YamlConfiguration) plugin.getConfig();
|
||||
@ -672,7 +671,7 @@ public final class Settings extends YamlConfiguration {
|
||||
|
||||
public final void reload() {
|
||||
load();
|
||||
loadDefaults(file.getName());
|
||||
loadDefaults(file);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -704,13 +703,11 @@ public final class Settings extends YamlConfiguration {
|
||||
* @param filename
|
||||
* The filename to open
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public final void loadDefaults(String filename) {
|
||||
InputStream stream = plugin.getResource(filename);
|
||||
if (stream == null)
|
||||
public final void loadDefaults(File file) {
|
||||
if (file.exists())
|
||||
return;
|
||||
|
||||
setDefaults(YamlConfiguration.loadConfiguration(stream));
|
||||
setDefaults(YamlConfiguration.loadConfiguration(file));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user