LunaChat v3.0.2 : implementation of TODO tasks.
このコミットが含まれているのは:
1 親
7f877d0674
コミット
f0fe3f02e6
29ファイル変更
+525
-196
検索条件に一致するファイルはありません
@@ -10,6 +10,8 @@ import java.io.IOException;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.github.ucchyocean.lc3.util.YamlConfig;
|
||||
|
||||
/**
|
||||
* UUIDのキャッシュデータを管理するクラス
|
||||
* @author ucchy
|
||||
@@ -80,4 +82,20 @@ public class UUIDCacheData {
|
||||
public @Nullable String get(String uuid) {
|
||||
return cache.getString(uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* プレイヤー名からUUIDを取得する
|
||||
* @param name プレイヤー名
|
||||
* @return UUID(キャッシュされていない場合はnullが返される)
|
||||
*/
|
||||
public @Nullable String getUUIDFromName(String name) {
|
||||
if ( name == null ) return null;
|
||||
for ( String uuid : cache.getKeys(false) ) {
|
||||
String n = cache.getString(uuid);
|
||||
if ( name.equalsIgnoreCase(n) ) {
|
||||
return uuid;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする