mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2025-08-06 04:23:32 +00:00
Try to get the offline player directly
This commit is contained in:
parent
3d3006c681
commit
c4fb5489fa
4 changed files with 16 additions and 0 deletions
|
@ -72,6 +72,10 @@ public class PlayerDataManager implements IPlayerDataManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static UUID matchUser(String search) {
|
private static UUID matchUser(String search) {
|
||||||
|
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(search);
|
||||||
|
if (offlinePlayer != null && offlinePlayer.hasPlayedBefore()) {
|
||||||
|
return offlinePlayer.getUniqueId();
|
||||||
|
}
|
||||||
UUID found = null;
|
UUID found = null;
|
||||||
|
|
||||||
String lowerSearch = search.toLowerCase();
|
String lowerSearch = search.toLowerCase();
|
||||||
|
|
|
@ -72,6 +72,10 @@ public class PlayerDataManager implements IPlayerDataManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static UUID matchUser(String search) {
|
private static UUID matchUser(String search) {
|
||||||
|
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(search);
|
||||||
|
if (offlinePlayer != null && offlinePlayer.hasPlayedBefore()) {
|
||||||
|
return offlinePlayer.getUniqueId();
|
||||||
|
}
|
||||||
UUID found = null;
|
UUID found = null;
|
||||||
|
|
||||||
String lowerSearch = search.toLowerCase();
|
String lowerSearch = search.toLowerCase();
|
||||||
|
|
|
@ -65,6 +65,10 @@ public class PlayerDataManager implements IPlayerDataManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static UUID matchUser(String search) {
|
private static UUID matchUser(String search) {
|
||||||
|
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(search);
|
||||||
|
if (offlinePlayer != null && offlinePlayer.hasPlayedBefore()) {
|
||||||
|
return offlinePlayer.getUniqueId();
|
||||||
|
}
|
||||||
UUID found = null;
|
UUID found = null;
|
||||||
|
|
||||||
String lowerSearch = search.toLowerCase();
|
String lowerSearch = search.toLowerCase();
|
||||||
|
|
|
@ -65,6 +65,10 @@ public class PlayerDataManager implements IPlayerDataManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static UUID matchUser(String search) {
|
private static UUID matchUser(String search) {
|
||||||
|
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(search);
|
||||||
|
if (offlinePlayer != null && offlinePlayer.hasPlayedBefore()) {
|
||||||
|
return offlinePlayer.getUniqueId();
|
||||||
|
}
|
||||||
UUID found = null;
|
UUID found = null;
|
||||||
|
|
||||||
String lowerSearch = search.toLowerCase();
|
String lowerSearch = search.toLowerCase();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue