mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-16 08:57:59 +02:00
uuid fix
This commit is contained in:
parent
864661c797
commit
ff9ec22041
@ -35,21 +35,30 @@ public class OtherAccounts extends CustomConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addPlayer(UUID uuid) {
|
public void addPlayer(UUID uuid) {
|
||||||
Player player = Bukkit.getPlayer(uuid);
|
try {
|
||||||
if (player == null) return;
|
Player player = Bukkit.getPlayer(uuid);
|
||||||
if (!this.getStringList(uuid.toString()).contains(player.getName())) {
|
if (player == null) return;
|
||||||
this.getStringList(uuid.toString()).add(player.getName());
|
if (!this.getStringList(uuid.toString()).contains(player.getName())) {
|
||||||
save();
|
this.getStringList(uuid.toString()).add(player.getName());
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
} catch (NoSuchMethodError e) {
|
||||||
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removePlayer(UUID uuid) {
|
public void removePlayer(UUID uuid) {
|
||||||
Player player = Bukkit.getPlayer(uuid);
|
try {
|
||||||
if (player == null) return;
|
Player player = Bukkit.getPlayer(uuid);
|
||||||
if (this.getStringList(uuid.toString()).contains(player.getName())) {
|
if (player == null) return;
|
||||||
this.getStringList(uuid.toString()).remove(player.getName());
|
if (this.getStringList(uuid.toString()).contains(player.getName())) {
|
||||||
save();
|
this.getStringList(uuid.toString()).remove(player.getName());
|
||||||
|
save();
|
||||||
|
}
|
||||||
|
} catch (NoSuchMethodError e) {
|
||||||
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getAllPlayersByUUID(UUID uuid) {
|
public List<String> getAllPlayersByUUID(UUID uuid) {
|
||||||
|
Loading…
Reference in New Issue
Block a user