Skip to content

Commit 10445c5

Browse files
PlayerFinder: fix a bug which returning null for name2uuid
1 parent c498844 commit 10445c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/maxgamer/quickshop/util/PlayerFinder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,12 @@ public static UUID findUUIDByName(String name, boolean includingBlockingWebReq)
182182
}
183183
//Blocking web request/querying user cache
184184
//TODO:Adding timeout
185-
if (includingBlockingWebReq && profile == null) {
185+
if (profile == null && includingBlockingWebReq) {
186186
OfflinePlayer player = Bukkit.getServer().getOfflinePlayer(name);
187187
profile = new PlayerProfile(player.getName(), player.getUniqueId());
188-
} else {
188+
}
189+
190+
if (profile == null) {
189191
return null;
190192
}
191193
puttingToCache(profile.getName(), profile.getUuid());

0 commit comments

Comments
 (0)