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
1 changed files with 4 additions and 0 deletions

View File

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