mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 03:05:17 +01:00
cleanup
This commit is contained in:
parent
9e6db7b9f8
commit
92777cd383
@ -104,20 +104,16 @@ public class DataManager {
|
||||
for (String name : cleared) {
|
||||
try {
|
||||
org.bukkit.OfflinePlayer player = getOfflinePlayer(name);
|
||||
File playerFile = null;
|
||||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
playerFile = new File(plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getUniqueId() + ".dat");
|
||||
} catch(Exception ignore) {
|
||||
}
|
||||
if (playerFile.exists()) {
|
||||
File playerFile = new File(plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getUniqueId() + ".dat");
|
||||
playerFile.delete();
|
||||
i++;
|
||||
} else {
|
||||
playerFile = new File(plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getName() + ".dat");
|
||||
} catch(Exception ignore) {
|
||||
File playerFile = new File(plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getName() + ".dat");
|
||||
if (playerFile.exists()) {
|
||||
playerFile.delete();
|
||||
i++;
|
||||
@ -134,22 +130,15 @@ public class DataManager {
|
||||
int i = 0;
|
||||
for (String name : cleared) {
|
||||
try {
|
||||
File playerFile = null;
|
||||
try {
|
||||
playerFile = new File(plugin.ess.getDataFolder() + File.separator + "userdata" + File.separator + plugin.getServer().getOfflinePlayer(name).getUniqueId() + ".yml");
|
||||
} catch(Exception ignore) {
|
||||
}
|
||||
if (playerFile.exists()) {
|
||||
File playerFile = new File(plugin.ess.getDataFolder() + File.separator + "userdata" + File.separator + plugin.getServer().getOfflinePlayer(name).getUniqueId() + ".yml");
|
||||
playerFile.delete();
|
||||
i++;
|
||||
} else {
|
||||
playerFile = new File(plugin.ess.getDataFolder() + File.separator + "userdata" + File.separator + name + ".yml");
|
||||
if (playerFile.exists()) {
|
||||
playerFile.delete();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
File playerFile = new File(plugin.ess.getDataFolder() + File.separator + "userdata" + File.separator + name + ".yml");
|
||||
if (playerFile.exists()) {
|
||||
playerFile.delete();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
ConsoleLogger.info("AutoPurgeDatabase : Remove " + i + " EssentialsFiles");
|
||||
|
@ -255,6 +255,7 @@ public class AdminCommand implements CommandExecutor {
|
||||
}
|
||||
}
|
||||
plugin.getServer().getScheduler().runTaskAsynchronously(plugin, new Runnable() {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
@ -9,6 +9,8 @@ import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import com.zaxxer.hikari.HikariConfig;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import com.zaxxer.hikari.pool.PoolInitializationException;
|
||||
@ -19,8 +21,6 @@ import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.security.HashAlgorithm;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
public class MySQL implements DataSource {
|
||||
|
||||
private String host;
|
||||
|
Loading…
Reference in New Issue
Block a user