diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index fc719c3f5..f320e5b5f 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -250,11 +250,11 @@ public class AuthMe extends JavaPlugin { ConsoleLogger.showError("WARNING!!! By disabling ForceSingleSession, your server protection is inadequate!"); } - if (Settings.getSessionTimeout == 0 && Settings.isSessionsEnabled){ + if (Settings.getSessionTimeout == 0 && Settings.isSessionsEnabled) { ConsoleLogger.showError("WARNING!!! You set session timeout to 0, this may cause security issues!"); } - if (Settings.reloadSupport) + if (Settings.reloadSupport) { try { int playersOnline = 0; try { @@ -279,9 +279,9 @@ public class AuthMe extends JavaPlugin { } } catch (Exception ex) { } + } - if (Settings.usePurge) - autoPurge(); + autoPurge(); // Download GeoIp.dat file downloadGeoIp(); @@ -545,13 +545,13 @@ public class AuthMe extends JavaPlugin { return; ConsoleLogger.info("AutoPurging the Database: " + cleared.size() + " accounts removed!"); if (Settings.purgeEssentialsFile && this.ess != null) - dataManager.purgeEssentials(cleared); + dataManager.purgeEssentials(cleared); // name to UUID convertion needed with latest versions if (Settings.purgePlayerDat) - dataManager.purgeDat(cleared); + dataManager.purgeDat(cleared); // name to UUID convertion needed with latest versions of MC if (Settings.purgeLimitedCreative) dataManager.purgeLimitedCreative(cleared); if (Settings.purgeAntiXray) - dataManager.purgeAntiXray(cleared); + dataManager.purgeAntiXray(cleared); // IDK if it uses UUID or names... (Actually it purges only names!) if (Settings.purgePermissions) dataManager.purgePermissions(cleared, permission); } diff --git a/src/main/java/fr/xephi/authme/DataManager.java b/src/main/java/fr/xephi/authme/DataManager.java index 2bcfa17aa..072d97416 100644 --- a/src/main/java/fr/xephi/authme/DataManager.java +++ b/src/main/java/fr/xephi/authme/DataManager.java @@ -109,6 +109,12 @@ public class DataManager { if (playerFile.exists()) { playerFile.delete(); i++; + } else { + playerFile = new File(plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getUniqueId() + ".dat"); + if (playerFile.exists()) { + playerFile.delete(); + i++; + } } } catch (Exception e) { } @@ -116,6 +122,7 @@ public class DataManager { ConsoleLogger.info("AutoPurgeDatabase : Remove " + i + " .dat Files"); } + @SuppressWarnings("deprecation") public void purgeEssentials(List cleared) { int i = 0; for (String name : cleared) { @@ -124,6 +131,12 @@ public class DataManager { if (playerFile.exists()) { playerFile.delete(); i++; + } else { + playerFile = new File(plugin.ess.getDataFolder() + File.separator + "userdata" + File.separator + Bukkit.getOfflinePlayer(name).getUniqueId() + ".yml"); + if (playerFile.exists()) { + playerFile.delete(); + i++; + } } } catch (Exception e) { } diff --git a/src/main/java/fr/xephi/authme/modules/Module.java b/src/main/java/fr/xephi/authme/modules/Module.java index 779beb65e..6011097af 100644 --- a/src/main/java/fr/xephi/authme/modules/Module.java +++ b/src/main/java/fr/xephi/authme/modules/Module.java @@ -13,6 +13,7 @@ public interface Module { public enum ModuleType { MANAGER, MYSQL, + REDIS, ACTIONS, CONVERTERS, EMAILS,