LunaChat v3-k2 : initial revision.
このコミットが含まれているのは:
1 親
7fdb159cff
コミット
5ddd0959d8
78ファイル変更
+215
-606
検索条件に一致するファイルはありません
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @author ucchy
|
||||
* @license LGPLv3
|
||||
* @copyright Copyright ucchy 2013
|
||||
* @copyright Copyright ucchy 2020
|
||||
*/
|
||||
package com.github.ucchyocean.lc.channel;
|
||||
|
||||
@@ -471,7 +471,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
return null;
|
||||
}
|
||||
|
||||
Channel channel = new ChannelImpl(name);
|
||||
Channel channel = new BukkitChannel(name);
|
||||
channel.alias = castWithDefault(data.get(KEY_ALIAS), "");
|
||||
channel.description = castWithDefault(data.get(KEY_DESC), "");
|
||||
channel.format = castWithDefault(data.get(KEY_FORMAT), channel.format);
|
||||
@@ -605,30 +605,6 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
return (Map<String, Long>)obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* チャンネルの設定ファイルが、UUID化のために一旦保存が必要かどうかを返す
|
||||
* @param data チャンネルの実コンフィグデータ
|
||||
*/
|
||||
private static boolean isNeedToSaveForUUIDUpdate(Map<String, Object> data) {
|
||||
|
||||
if ( !Utility.isCB178orLater() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
List<String> members = castToStringList(data.get(KEY_MEMBERS));
|
||||
if ( members.size() == 0 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for ( String member : members ) {
|
||||
if ( member.startsWith("$") ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* チャンネルの別名を返す
|
||||
* @return チャンネルの別名
|
||||
@@ -974,12 +950,6 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
data.put(key, config.get(key));
|
||||
}
|
||||
Channel channel = deserialize(data);
|
||||
|
||||
// 自動アップデート
|
||||
if ( isNeedToSaveForUUIDUpdate(data) ) {
|
||||
channel.save();
|
||||
}
|
||||
|
||||
result.put(channel.name.toLowerCase(), channel);
|
||||
}
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする