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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
File playerFile = new File(plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getUniqueId() + ".dat");
|
File playerFile = new File(plugin.getServer().getWorldContainer() + File.separator + Settings.defaultWorld + File.separator + "players" + File.separator + player.getUniqueId() + ".dat");
|
||||||
playerFile.delete();
|
playerFile.delete();
|
||||||
i++;
|
i++;
|
||||||
} catch(Exception ignore) {
|
} catch(Exception ignore) {
|
||||||
@ -129,12 +129,12 @@ public class DataManager {
|
|||||||
public void purgeEssentials(List<String> cleared) {
|
public void purgeEssentials(List<String> cleared) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (String name : cleared) {
|
for (String name : cleared) {
|
||||||
try {
|
try {
|
||||||
File playerFile = new File(plugin.ess.getDataFolder() + File.separator + "userdata" + File.separator + plugin.getServer().getOfflinePlayer(name).getUniqueId() + ".yml");
|
File playerFile = new File(plugin.ess.getDataFolder() + File.separator + "userdata" + File.separator + plugin.getServer().getOfflinePlayer(name).getUniqueId() + ".yml");
|
||||||
playerFile.delete();
|
playerFile.delete();
|
||||||
i++;
|
i++;
|
||||||
} catch (Exception e) {
|
} 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()) {
|
if (playerFile.exists()) {
|
||||||
playerFile.delete();
|
playerFile.delete();
|
||||||
i++;
|
i++;
|
||||||
@ -186,7 +186,7 @@ public class DataManager {
|
|||||||
|
|
||||||
public Player getOnlinePlayerLower(String name) {
|
public Player getOnlinePlayerLower(String name) {
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
for (Player player : Utils.getOnlinePlayers()) {
|
||||||
if (player.getName().equalsIgnoreCase(name))
|
if (player.getName().equalsIgnoreCase(name))
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user