LunaChat v2.7.1 : Fixed issue #125

このコミットが含まれているのは:
ucchy committed 2015-02-17 01:05:06 +09:00
1 親 d647fadd17
コミット b99d447d81
7ファイル変更
+71 -7

検索条件に一致するファイルはありません

+32
ファイルの表示
@@ -15,6 +15,7 @@ import org.bukkit.entity.Player;
import com.github.ucchyocean.lc.Utility;
import com.github.ucchyocean.lc.channel.Channel;
import com.github.ucchyocean.lc.event.LunaChatChannelOptionChangedEvent;
import com.github.ucchyocean.lc.japanize.JapanizeType;
/**
* optionコマンドの実行クラス
@@ -324,6 +325,37 @@ public class OptionCommand extends SubCommandAbst {
}
}
if ( options.containsKey("japanize") ) {
// Japanize変換設定
String pnode = PERMISSION_NODE + ".japanize";
if ( !sender.hasPermission(pnode) ) {
sendResourceMessage(sender, PREERR,
"errmsgNotPermission", pnode);
} else {
String value = options.get("japanize");
if ( value.equals("") ) {
channel.setJapanizeType(null);
sendResourceMessage(sender, PREINFO,
"cmdmsgOption", "japanize", "デフォルト");
setOption = true;
} else {
JapanizeType type = JapanizeType.fromID(value, null);
if ( type == null ) {
sendResourceMessage(sender, PREERR,
"errmsgInvalidJapanizeOption", "japanize", value);
} else {
channel.setJapanizeType(type);
sendResourceMessage(sender, PREINFO,
"cmdmsgOption", "japanize", type.toString());
setOption = true;
}
}
}
}
if ( !channel.isGlobalChannel() ) {
if ( options.containsKey("password") ) {