mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 03:05:17 +01:00
1.7 compatibility
This commit is contained in:
parent
beb46ebf6f
commit
a2381fa025
@ -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<String> 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user