LunaChat v2.5.8 : Fixed issue #74 and refined kana converter.
このコミットが含まれているのは:
1 親
0ac072433c
コミット
6a1e82421a
3ファイル変更
+33
-24
検索条件に一致するファイルはありません
@@ -18,10 +18,7 @@ import org.bukkit.entity.Player;
|
||||
|
||||
import com.github.ucchyocean.lc.event.LunaChatChannelCreateEvent;
|
||||
import com.github.ucchyocean.lc.event.LunaChatChannelRemoveEvent;
|
||||
import com.github.ucchyocean.lc.event.LunaChatPostJapanizeEvent;
|
||||
import com.github.ucchyocean.lc.japanize.IMEConverter;
|
||||
import com.github.ucchyocean.lc.japanize.JapanizeType;
|
||||
import com.github.ucchyocean.lc.japanize.KanaConverter;
|
||||
|
||||
/**
|
||||
* チャンネルマネージャー
|
||||
@@ -482,26 +479,13 @@ public class ChannelManager implements LunaChatAPI {
|
||||
return message;
|
||||
}
|
||||
|
||||
// カナ変換
|
||||
String japanized = KanaConverter.conv(message);
|
||||
|
||||
// IME変換
|
||||
if ( type == JapanizeType.GOOGLE_IME ) {
|
||||
japanized = IMEConverter.convByGoogleIME(japanized);
|
||||
} else if ( type == JapanizeType.SOCIAL_IME ) {
|
||||
japanized = IMEConverter.convBySocialIME(japanized);
|
||||
// Japanize変換タスクを作成して、同期で実行する。
|
||||
DelayedJapanizeConvertTask task = new DelayedJapanizeConvertTask(
|
||||
message, type, null, null, "%japanize", null);
|
||||
if ( task.runSync() ) {
|
||||
return task.getResult();
|
||||
}
|
||||
|
||||
// イベントコール
|
||||
LunaChatPostJapanizeEvent event =
|
||||
new LunaChatPostJapanizeEvent("", message, japanized);
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
if ( event.isCancelled() ) {
|
||||
return null;
|
||||
}
|
||||
japanized = event.getJapanized();
|
||||
|
||||
return japanized;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする