From a2381fa02526e94206cc6666ea838dcf3599744f Mon Sep 17 00:00:00 2001 From: DNx5 Date: Fri, 23 Oct 2015 00:23:12 +0700 Subject: [PATCH] 1.7 compatibility --- src/main/java/fr/xephi/authme/DataManager.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/fr/xephi/authme/DataManager.java b/src/main/java/fr/xephi/authme/DataManager.java index 0202e11cf..2d08489df 100644 --- a/src/main/java/fr/xephi/authme/DataManager.java +++ b/src/main/java/fr/xephi/authme/DataManager.java @@ -108,8 +108,8 @@ public class DataManager { continue; } - try { - File playerFile = new File(plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getUniqueId() + ".dat"); + try { + File playerFile = new File(plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getUniqueId() + ".dat"); playerFile.delete(); i++; } catch(Exception ignore) { @@ -129,12 +129,12 @@ public class DataManager { public void purgeEssentials(List cleared) { int i = 0; for (String name : cleared) { - try { + try { File playerFile = new File(plugin.ess.getDataFolder() + File.separator + "userdata" + File.separator + plugin.getServer().getOfflinePlayer(name).getUniqueId() + ".yml"); playerFile.delete(); i++; } catch (Exception e) { - File playerFile = new File(plugin.ess.getDataFolder() + File.separator + "userdata" + File.separator + name + ".yml"); + File playerFile = new File(plugin.ess.getDataFolder() + File.separator + "userdata" + File.separator + name + ".yml"); if (playerFile.exists()) { playerFile.delete(); i++; @@ -186,7 +186,7 @@ public class DataManager { public Player getOnlinePlayerLower(String name) { name = name.toLowerCase(); - for (Player player : Bukkit.getOnlinePlayers()) { + for (Player player : Utils.getOnlinePlayers()) { if (player.getName().equalsIgnoreCase(name)) return player; }