コード例 #1
0
 public UUID getUUID(final String name, RunnableVal<UUID> ifFetch) {
   if ((name == null) || (name.length() == 0)) {
     return null;
   }
   // check online
   final PlotPlayer player = getPlayer(name);
   if (player != null) {
     return player.getUUID();
   }
   // check cache
   final StringWrapper wrap = new StringWrapper(name);
   UUID uuid = uuidMap.get(wrap);
   if (uuid != null) {
     return uuid;
   }
   // Read from disk OR convert directly to offline UUID
   if (Settings.OFFLINE_MODE) {
     uuid = uuidWrapper.getUUID(name);
     add(new StringWrapper(name), uuid);
     return uuid;
   }
   if (Settings.UUID_FROM_DISK && ifFetch != null) {
     fetchUUID(name, ifFetch);
     return null;
   }
   return null;
 }
コード例 #2
0
 public UUID getUUID(final OfflinePlotPlayer player) {
   return uuidWrapper.getUUID(player);
 }