LunaChat v2.6.3 : Fixed issue #93

このコミットが含まれているのは:
ucchyocean committed 2014-04-20 21:14:45 +09:00
1 親 a98007ecce
コミット e80aa29253
7ファイル変更
+19 -28

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

+12
ファイルの表示
@@ -192,4 +192,16 @@ public class LunaChat extends JavaPlugin {
public DynmapBridge getDynmap() {
return dynmap;
}
/**
* 指定された名前がチャンネル名として使用可能かどうかを判定する<br/>
* 具体的には、英数字・ハイフン・アンダーバー のいずれかから構成される、
* 1文字から20文字の文字列、の場合に、trueを返す。<br/>
* (既に存在するチャンネル名をチェックするわけではない。)
* @param name 名前
* @return チャンネル名として使用可能かどうか
*/
public static boolean checkForChannelName(String name) {
return name.matches("[0-9a-zA-Z\\-_]{1,20}");
}
}
-10
ファイルの表示
@@ -137,16 +137,6 @@ public interface LunaChatAPI {
*/
public boolean isPlayerJapanize(String playerName);
/**
* 指定された名前がチャンネル名として使用可能かどうかを判定する<br/>
* 具体的には、英数字・ハイフン・アンダーバー のいずれかから構成される、
* 1文字から20文字の文字列、の場合に、trueを返す。<br/>
* (既に存在するチャンネル名をチェックするわけではない。)
* @param name 名前
* @return チャンネル名として使用可能かどうか
*/
public boolean checkForChannelName(String name);
/**
* LunaChatの全データを再読み込みする
*/
+1 -1
ファイルの表示
@@ -202,7 +202,7 @@ public class LunaChatConfig {
// globalチャンネルが、使用可能なチャンネル名かどうかを調べる
if ( !globalChannel.equals("") &&
!LunaChat.getInstance().getLunaChatAPI().checkForChannelName(globalChannel) ) {
!LunaChat.checkForChannelName(globalChannel) ) {
String msg = String.format(
Resources.get("errmsgCannotUseForGlobal"), globalChannel);
LunaChat.getInstance().getLogger().warning(msg);
-13
ファイルの表示
@@ -465,17 +465,4 @@ public class ChannelManager implements LunaChatAPI {
japanize.put(playerName, doJapanize);
saveJapanize();
}
/**
* 指定された名前がチャンネル名として使用可能かどうかを判定する<br/>
* 具体的には、英数字・ハイフン・アンダーバー のいずれかから構成される、
* 1文字から20文字の文字列、の場合に、trueを返す。<br/>
* (既に存在するチャンネル名をチェックするわけではない。)
* @param name 名前
* @return チャンネル名として使用可能かどうか
*/
@Override
public boolean checkForChannelName(String name) {
return name.matches("[0-9a-zA-Z\\-_]{1,20}");
}
}
+2 -1
ファイルの表示
@@ -7,6 +7,7 @@ package com.github.ucchyocean.lc.command;
import org.bukkit.command.CommandSender;
import com.github.ucchyocean.lc.LunaChat;
import com.github.ucchyocean.lc.channel.Channel;
/**
@@ -93,7 +94,7 @@ public class CreateCommand extends SubCommandAbst {
}
// 使用可能なチャンネル名かどうかをチェックする
if ( !api.checkForChannelName(name) ) {
if ( !LunaChat.checkForChannelName(name) ) {
sendResourceMessage(sender, PREINFO, "errmsgCannotUseForChannel", name);
return true;
}
+2 -1
ファイルの表示
@@ -8,6 +8,7 @@ package com.github.ucchyocean.lc.command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.github.ucchyocean.lc.LunaChat;
import com.github.ucchyocean.lc.channel.Channel;
import com.github.ucchyocean.lc.channel.ChannelPlayer;
@@ -122,7 +123,7 @@ public class JoinCommand extends SubCommandAbst {
// 存在しないチャットには、チャンネルを作って入る設定の場合
// 使用可能なチャンネル名かどうかをチェックする
if ( !api.checkForChannelName(channelName) ) {
if ( !LunaChat.checkForChannelName(channelName) ) {
sendResourceMessage(sender, PREINFO,
"errmsgCannotUseForChannel", channelName);
return true;