Skip to content

Commit

Permalink
Merge pull request #32 from ItsHarry/master
Browse files Browse the repository at this point in the history
Fix getUUIDFromName() returning null even when player is online.
  • Loading branch information
minecrafter committed Jan 26, 2016
2 parents f5af1ae + 9c63adb commit 1099583
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected Void call(Jedis jedis) {
}

Pipeline pipeline = jedis.pipelined();
plugin.getUuidTranslator().persistInfo(event.getConnection().getName(), event.getConnection().getUniqueId(), pipeline);
plugin.getUuidTranslator().persistInfo(event.getConnection().getName().toLowerCase(), event.getConnection().getUniqueId(), pipeline);
RedisUtil.createPlayer(event.getConnection(), pipeline, false);
// We're not publishing, the API says we only publish at PostLoginEvent time.
pipeline.sync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public final UUID getTranslatedUuid(@NonNull String player, boolean expensiveLoo
}
for (Map.Entry<String, UUID> entry : uuidMap1.entrySet()) {
if (entry.getKey().equalsIgnoreCase(player)) {
persistInfo(entry.getKey(), entry.getValue(), jedis);
persistInfo(entry.getKey().toLowerCase(), entry.getValue(), jedis);
return entry.getValue();
}
}
Expand Down Expand Up @@ -161,7 +161,7 @@ public final String getNameFromUuid(@NonNull UUID player, boolean expensiveLooku
}

if (name != null) {
persistInfo(name, player, jedis);
persistInfo(name.toLowerCase(), player, jedis);
return name;
}

Expand Down

0 comments on commit 1099583

Please sign in to comment.