Skip to content

Commit

Permalink
LunaChat v3.0.16 : Fixed issue #213.
Browse files Browse the repository at this point in the history
  • Loading branch information
ucchyocean committed Sep 27, 2020
1 parent e719e9e commit f00d978
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/main/java/com/github/ucchyocean/lc3/LunaChatConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ public class LunaChatConfig {
/** ノンジャパナイズマーカー これが発言の頭に入っている場合は、一時的にjapanizeを実行しない */
private String noneJapanizeMarker;

/** プレイヤーのJapanize変換を、デフォルトでオンにするかオフにするかを設定する。 */
private boolean japanizePlayerDefault;

/** 通常チャットで、JapanizeDisplayLine=2のとき、Japanize変換したあと表示するまでのウェイト(tick)
* 隠し設定。 */
private int japanizeWait;
Expand Down Expand Up @@ -264,6 +267,7 @@ public void reloadConfig(File dataFolder, File jarFile) {
japanizeLine2Format = config.getString("japanizeLine2Format", "&6[JP] %japanize");
japanizeIgnorePlayerName = config.getBoolean("japanizeIgnorePlayerName", true);
noneJapanizeMarker = config.getString("noneJapanizeMarker", "$");
japanizePlayerDefault = config.getBoolean("japanizePlayerDefault", true);
japanizeWait = config.getInt("japanizeWait", 1);

bungeePassThroughMode = config.getBoolean("bungeePassThroughMode", false);
Expand Down Expand Up @@ -563,6 +567,14 @@ public String getNoneJapanizeMarker() {
return noneJapanizeMarker;
}

/**
* プレイヤーのJapanize変換を、デフォルトでオンにするかオフにするかを設定する。
* @return japanizePlayerDefault
*/
public boolean isJapanizePlayerDefault() {
return japanizePlayerDefault;
}

/**
* 通常チャットで、JapanizeDisplayLine=2のとき、Japanize変換したあと表示するまでのウェイト(tick)
* @return japanizeWaitを返す
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public void removeAllDefaultChannels() {
@Override
public boolean isPlayerJapanize(String playerName) {
if ( !japanize.containsKey(playerName) ) {
return true;
return LunaChat.getConfig().isJapanizePlayerDefault();
}
return japanize.get(playerName);
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ japanizeIgnorePlayerName: true
# If this is at the beginning of your remark, do not temporarily perform Japanize conversion.
noneJapanizeMarker: '$'

# Sets whether player's Japanize conversion on or off by default.
japanizePlayerDefault: true


# -------------------- BungeeCord settings --------------------
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/config_ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ japanizeIgnorePlayerName: true
# これが発言の頭に入っている場合は、一時的にJapanize変換を実行しない。
noneJapanizeMarker: '$'

# プレイヤーのJapanize変換を、デフォルトでオンにするかオフにするかを設定する。
japanizePlayerDefault: true


# -------------------- BungeeCord設定 --------------------
Expand Down

0 comments on commit f00d978

Please sign in to comment.