mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2024-12-23 00:15:08 +00:00
commit
be5f784d74
1 changed files with 6 additions and 3 deletions
|
@ -81,9 +81,12 @@ public class PlayerDataManager implements IPlayerDataManager {
|
|||
for (OfflinePlayer player : offlinePlayers) {
|
||||
String name = player.getName();
|
||||
|
||||
if (name.equalsIgnoreCase(search))
|
||||
if (name == null){
|
||||
continue;
|
||||
}
|
||||
if (name.equalsIgnoreCase(search)){
|
||||
return player.getUniqueId();
|
||||
|
||||
}
|
||||
if (name.toLowerCase().startsWith(lowerSearch)) {
|
||||
int curDelta = name.length() - lowerSearch.length();
|
||||
if (curDelta < delta) {
|
||||
|
|
Loading…
Reference in a new issue