2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-23 04:28:01 +00:00

Allow UUIDs to be used in commands

This commit is contained in:
Tux 2014-05-23 10:50:05 -04:00
parent 25e93d06ee
commit 730b77f227

View File

@ -35,6 +35,10 @@ public class UUIDTranslator {
if (uuid != null) if (uuid != null)
return uuid; return uuid;
if (UUID_PATTERN.matcher(player).find()) {
return UUID.fromString(player);
}
if (!plugin.getProxy().getConfig().isOnlineMode()) { if (!plugin.getProxy().getConfig().isOnlineMode()) {
uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + player).getBytes(Charsets.UTF_8)); uuid = UUID.nameUUIDFromBytes(("OfflinePlayer:" + player).getBytes(Charsets.UTF_8));
uuidMap.put(player, uuid); uuidMap.put(player, uuid);