Skip to content

Commit 89c38ae

Browse files
committed
fix redundant lookup
1 parent a7d38b8 commit 89c38ae

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/main/java/pro/cloudnode/smp/smpcore/CachedProfile.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,9 @@ public record CachedProfile(@NotNull UUID uuid, @NotNull String name, @NotNull D
195195
return Bukkit.getOfflinePlayer(name);
196196
});
197197

198-
final @Nullable CachedProfile profile = CachedProfile.from(player);
199-
if (profile != null)
200-
return Bukkit.getOfflinePlayer(profile.uuid());
198+
CachedProfile.from(player);
201199

202-
// unlikely
203-
logger.warning("Unlikely cache miss for name " + name);
204-
return Bukkit.getOfflinePlayer(name);
200+
return player;
205201
}
206202

207203
/**

0 commit comments

Comments
 (0)