コミットを比較
| 作成者 | SHA1 | 日付 | |
|---|---|---|---|
|
|
b2af663fcd | ||
|
|
b1b91a0864 | ||
|
|
24c5de4e7c | ||
|
|
22541c1c9d | ||
|
|
23559dfebf | ||
|
|
6128131b11 | ||
|
|
2107091307 | ||
|
|
3dfd6d03be | ||
|
|
89a8decae6 | ||
|
|
1bacfee569 | ||
|
|
d1b979fc77 | ||
|
|
53e0eaae04 | ||
|
|
b1da4400f9 | ||
|
|
a0712c89fc | ||
|
|
4ecbe10636 | ||
|
|
148ef46937 | ||
|
|
30bfd3f2e8 | ||
|
|
e80aa29253 |
検索条件に一致するファイルはありません
@@ -0,0 +1,8 @@
|
||||
language: java
|
||||
jdk:
|
||||
- openjdk6
|
||||
- oraclejdk7
|
||||
- oraclejdk8
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@@ -1,7 +1,9 @@
|
||||
LunaChat
|
||||
========
|
||||
|
||||
チャンネルチャットプラグイン for ShiroumiServer<br />
|
||||
Build Status : [](https://travis-ci.org/ucchyocean/LunaChat)
|
||||
|
||||
チャンネルチャットプラグイン<br />
|
||||
<br />
|
||||
ダウンロードはこちらから<br />
|
||||
http://forum.minecraftuser.jp/viewtopic.php?f=38&t=13739<br />
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
|
||||
http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||
|
||||
<id>dist</id>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<files>
|
||||
<file>
|
||||
<source>target/LunaChat.jar</source>
|
||||
</file>
|
||||
</files>
|
||||
|
||||
</assembly>
|
||||
@@ -2,9 +2,17 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.github.ucchyocean</groupId>
|
||||
<artifactId>LunaChat</artifactId>
|
||||
<version>2.6.2</version>
|
||||
<version>2.6.7</version>
|
||||
<description>チャンネルチャットプラグイン</description>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU Lesser General Public License version 3</name>
|
||||
<url>http://www.gnu.org/licenses/lgpl-3.0.en.html</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
@@ -19,6 +27,7 @@
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<defaultGoal>clean javadoc:jar source:jar deploy</defaultGoal>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
@@ -28,12 +37,46 @@
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<encoding>UTF-8</encoding>
|
||||
<docencoding>UTF-8</docencoding>
|
||||
<charset>UTF-8</charset>
|
||||
<show>public</show>
|
||||
<nohelp>true</nohelp>
|
||||
<links>
|
||||
<link>http://docs.oracle.com/javase/6/docs/api/</link>
|
||||
<link>http://jd.bukkit.org/dev/apidocs/</link>
|
||||
</links>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<configuration>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
<descriptors>
|
||||
<descriptor>distribution.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>assembly</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
@@ -59,12 +102,13 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.7.8-R0.1-SNAPSHOT</version>
|
||||
<version>1.7.9-R0.2-SNAPSHOT</version>
|
||||
<!-- Stay 1.7.9-R0.2, cause by changing Bukkit#getOnlinePlayers method (BUKKIT-5668). -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>Vault</artifactId>
|
||||
<version>1.2.32</version>
|
||||
<version>1.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dynmap</groupId>
|
||||
|
||||
@@ -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}");
|
||||
}
|
||||
}
|
||||
@@ -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の全データを再読み込みする
|
||||
*/
|
||||
|
||||
@@ -86,6 +86,9 @@ public class LunaChatConfig {
|
||||
/** 通常チャットの装飾フォーマット */
|
||||
private String normalChatMessageFormat;
|
||||
|
||||
/** 通常チャットで、カラーコードを使用可能にするかどうか */
|
||||
private boolean enableNormalChatColorCode;
|
||||
|
||||
/** Japanize変換のタイプ<br/>
|
||||
* none = 日本語変換をしない<br/>
|
||||
* kana = カナ変換のみする<br/>
|
||||
@@ -188,6 +191,8 @@ public class LunaChatConfig {
|
||||
config.getBoolean("enableNormalChatMessageFormat", true);
|
||||
normalChatMessageFormat =
|
||||
config.getString("normalChatMessageFormat", "&f<%prefix%username%suffix&f> %msg");
|
||||
enableNormalChatColorCode =
|
||||
config.getBoolean("enableNormalChatColorCode", true);
|
||||
|
||||
japanizeType = JapanizeType.fromID(config.getString("japanizeType", "kana"));
|
||||
japanizeDisplayLine = config.getInt("japanizeDisplayLine", 2);
|
||||
@@ -202,7 +207,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);
|
||||
@@ -437,4 +442,12 @@ public class LunaChatConfig {
|
||||
public int getJapanizeWait() {
|
||||
return japanizeWait;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通常チャットで、カラーコードを使用可能にするかどうか
|
||||
* @return enableNormalChatColorCodeを返す
|
||||
*/
|
||||
public boolean isEnableNormalChatColorCode() {
|
||||
return enableNormalChatColorCode;
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ import java.io.FileWriter;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
/**
|
||||
@@ -48,8 +47,7 @@ public class LunaChatLogger {
|
||||
checkDir();
|
||||
|
||||
// 以降の処理を、発言処理の負荷軽減のため、非同期実行にする。(see issue #40.)
|
||||
Bukkit.getScheduler().runTaskAsynchronously(
|
||||
LunaChat.getInstance(), new BukkitRunnable() {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -72,7 +70,7 @@ public class LunaChatLogger {
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}.runTaskAsynchronously(LunaChat.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,6 @@ package com.github.ucchyocean.lc;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@@ -20,6 +19,8 @@ import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import com.github.ucchyocean.lc.bridge.VaultChatBridge;
|
||||
import com.github.ucchyocean.lc.channel.Channel;
|
||||
import com.github.ucchyocean.lc.channel.ChannelPlayer;
|
||||
import com.github.ucchyocean.lc.channel.ChannelPlayerName;
|
||||
import com.github.ucchyocean.lc.channel.ChannelPlayerUUID;
|
||||
import com.github.ucchyocean.lc.channel.DelayedJapanizeConvertTask;
|
||||
import com.github.ucchyocean.lc.japanize.JapanizeType;
|
||||
|
||||
@@ -125,7 +126,8 @@ public class PlayerListener implements Listener {
|
||||
if ( channel.isPersonalChat() && cname.contains(player.getName()) ) {
|
||||
boolean isAllOffline = true;
|
||||
for ( ChannelPlayer cp : channel.getMembers() ) {
|
||||
if ( !cp.equals(player) && cp.isOnline() ) {
|
||||
if ( !cp.equals(player) && cp.isOnline() &&
|
||||
(cp instanceof ChannelPlayerName || cp instanceof ChannelPlayerUUID) ) {
|
||||
isAllOffline = false;
|
||||
}
|
||||
}
|
||||
@@ -194,7 +196,12 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
|
||||
// カラーコード置き換え
|
||||
message = Utility.replaceColorCode(message);
|
||||
// 置き換え設定になっていて、発言者がパーミッションを持っているなら、置き換えする
|
||||
if ( config.isEnableNormalChatColorCode() &&
|
||||
event.getPlayer().hasPermission("lunachat.allowcc") ) {
|
||||
message = Utility.replaceColorCode(message);
|
||||
}
|
||||
|
||||
|
||||
// 一時的にJapanizeスキップ設定かどうかを確認する
|
||||
boolean skipJapanize = false;
|
||||
@@ -205,9 +212,10 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
|
||||
// 2byteコードを含むなら、Japanize変換は行わない
|
||||
String kanaTemp = Utility.stripColor(message);
|
||||
if ( !skipJapanize &&
|
||||
( message.getBytes().length > message.length() ||
|
||||
message.matches("[ \\uFF61-\\uFF9F]+") ) ) {
|
||||
( kanaTemp.getBytes().length > kanaTemp.length() ||
|
||||
kanaTemp.matches("[ \\uFF61-\\uFF9F]+") ) ) {
|
||||
skipJapanize = true;
|
||||
}
|
||||
|
||||
@@ -217,29 +225,28 @@ public class PlayerListener implements Listener {
|
||||
config.getJapanizeType() != JapanizeType.NONE ) {
|
||||
|
||||
int lineType = config.getJapanizeDisplayLine();
|
||||
String taskFormat;
|
||||
|
||||
if ( lineType == 1 ) {
|
||||
|
||||
taskFormat = config.getJapanizeLine1Format();
|
||||
String taskFormat = Utility.replaceColorCode(config.getJapanizeLine1Format());
|
||||
|
||||
String japanized = api.japanize(
|
||||
message, config.getJapanizeType());
|
||||
kanaTemp, config.getJapanizeType());
|
||||
if ( japanized != null ) {
|
||||
String temp = taskFormat.replace("%msg", message);
|
||||
temp = temp.replace("%japanize", japanized);
|
||||
message = Utility.replaceColorCode(temp);
|
||||
message = temp.replace("%japanize", japanized);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
taskFormat = config.getJapanizeLine2Format();
|
||||
String taskFormat = Utility.replaceColorCode(config.getJapanizeLine2Format());
|
||||
|
||||
DelayedJapanizeConvertTask task = new DelayedJapanizeConvertTask(message,
|
||||
config.getJapanizeType(), null, player, taskFormat, null);
|
||||
|
||||
// 発言処理を必ず先に実施させるため、遅延を入れてタスクを実行する。
|
||||
int wait = config.getJapanizeWait();
|
||||
Bukkit.getScheduler().runTaskLater(LunaChat.getInstance(), task, wait);
|
||||
task.runTaskLater(LunaChat.getInstance(), wait);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,6 +341,10 @@ public class PlayerListener implements Listener {
|
||||
format = format.replace("%suffix", suffix);
|
||||
}
|
||||
|
||||
if ( format.contains("%world") ) {
|
||||
format = format.replace("%world", player.getWorld().getName());
|
||||
}
|
||||
|
||||
return Utility.replaceColorCode(format);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.util.zip.ZipEntry;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* ユーティリティクラス
|
||||
@@ -26,6 +27,8 @@ import org.bukkit.ChatColor;
|
||||
*/
|
||||
public class Utility {
|
||||
|
||||
private static Boolean isCB178orLaterCache;
|
||||
|
||||
/**
|
||||
* jarファイルの中に格納されているファイルを、jarファイルの外にコピーするメソッド
|
||||
* @param jarFile jarファイル
|
||||
@@ -111,12 +114,21 @@ public class Utility {
|
||||
}
|
||||
|
||||
/**
|
||||
* 文字列内のカラーコードを置き換えする
|
||||
* 文字列内のカラーコード候補(&a)を、カラーコード(§a)に置き換えする
|
||||
* @param source 置き換え元の文字列
|
||||
* @return 置き換え後の文字列
|
||||
*/
|
||||
public static String replaceColorCode(String source) {
|
||||
return source.replaceAll("&([0-9a-fk-or])", "\u00A7$1");
|
||||
return ChatColor.translateAlternateColorCodes('&', source);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文字列に含まれているカラーコード(§a)を除去して返す
|
||||
* @param source 置き換え元の文字列
|
||||
* @return 置き換え後の文字列
|
||||
*/
|
||||
public static String stripColor(String source) {
|
||||
return ChatColor.stripColor(source);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -189,6 +201,10 @@ public class Utility {
|
||||
*/
|
||||
public static boolean isCB178orLater() {
|
||||
|
||||
if ( isCB178orLaterCache != null ) {
|
||||
return isCB178orLaterCache;
|
||||
}
|
||||
|
||||
int[] borderNumbers = {1, 7, 8};
|
||||
|
||||
String version = Bukkit.getBukkitVersion();
|
||||
@@ -200,24 +216,43 @@ public class Utility {
|
||||
String[] versionArray = version.split("\\.");
|
||||
int[] versionNumbers = new int[versionArray.length];
|
||||
for ( int i=0; i<versionArray.length; i++ ) {
|
||||
if ( !versionArray[i].matches("[0-9]+") )
|
||||
if ( !versionArray[i].matches("[0-9]+") ) {
|
||||
isCB178orLaterCache = false;
|
||||
return false;
|
||||
}
|
||||
versionNumbers[i] = Integer.parseInt(versionArray[i]);
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
while ( (versionNumbers.length > index) && (borderNumbers.length > index) ) {
|
||||
if ( versionNumbers[index] > borderNumbers[index] ) {
|
||||
isCB178orLaterCache = true;
|
||||
return true;
|
||||
} else if ( versionNumbers[index] < borderNumbers[index] ) {
|
||||
isCB178orLaterCache = false;
|
||||
return false;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
if ( borderNumbers.length == index ) {
|
||||
isCB178orLaterCache = true;
|
||||
return true;
|
||||
} else {
|
||||
isCB178orLaterCache = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 現在のサーバー接続人数を返します。
|
||||
* @return サーバー接続人数
|
||||
*/
|
||||
public static int getOnlinePlayersCount() {
|
||||
int count = 0;
|
||||
for ( @SuppressWarnings("unused")
|
||||
Player player : Bukkit.getOnlinePlayers() ) {
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
private static final String KEY_RANGE = "range";
|
||||
private static final String KEY_BAN_EXPIRES = "ban_expires";
|
||||
private static final String KEY_MUTE_EXPIRES = "mute_expires";
|
||||
private static final String KEY_ALLOWCC = "allowcc";
|
||||
|
||||
/** 参加者 */
|
||||
private List<ChannelPlayer> members;
|
||||
@@ -111,6 +112,9 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
/** 1:1チャットの相手名 */
|
||||
private String privateMessageTo;
|
||||
|
||||
/** カラーコードの使用可否 */
|
||||
private boolean allowcc;
|
||||
|
||||
/**
|
||||
* コンストラクタ
|
||||
* @param name チャンネルの名称
|
||||
@@ -133,6 +137,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
this.banExpires = new HashMap<ChannelPlayer, Long>();
|
||||
this.muteExpires = new HashMap<ChannelPlayer, Long>();
|
||||
this.privateMessageTo = "";
|
||||
this.allowcc = true;
|
||||
|
||||
LunaChatConfig config = LunaChat.getInstance().getLunaChatConfig();
|
||||
if ( isPersonalChat() ) {
|
||||
@@ -143,6 +148,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 1:1チャットかどうか
|
||||
* @return 1:1チャットかどうか
|
||||
*/
|
||||
public boolean isPersonalChat() {
|
||||
@@ -150,6 +156,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* ブロードキャストチャンネルかどうか
|
||||
* @return ブロードキャストチャンネルかどうか
|
||||
*/
|
||||
public boolean isBroadcastChannel() {
|
||||
@@ -157,6 +164,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* グローバルチャンネルかどうか
|
||||
* @return グローバルチャンネルかどうか
|
||||
*/
|
||||
public boolean isGlobalChannel() {
|
||||
@@ -165,6 +173,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 強制参加チャンネルかどうか
|
||||
* @return 強制参加チャンネルかどうか
|
||||
*/
|
||||
public boolean isForceJoinChannel() {
|
||||
@@ -363,7 +372,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
|
||||
// ブロードキャストチャンネルならサーバー接続人数を返す
|
||||
if ( isBroadcastChannel() ) {
|
||||
return Bukkit.getOnlinePlayers().length;
|
||||
return Utility.getOnlinePlayersCount();
|
||||
}
|
||||
|
||||
// メンバーの人数を数える
|
||||
@@ -384,7 +393,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
|
||||
// ブロードキャストチャンネルならサーバー接続人数を返す
|
||||
if ( isBroadcastChannel() ) {
|
||||
return Bukkit.getOnlinePlayers().length;
|
||||
return Utility.getOnlinePlayersCount();
|
||||
}
|
||||
|
||||
return members.size();
|
||||
@@ -420,6 +429,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
map.put(KEY_RANGE, chatRange);
|
||||
map.put(KEY_BAN_EXPIRES, getStringLongMap(banExpires));
|
||||
map.put(KEY_MUTE_EXPIRES, getStringLongMap(muteExpires));
|
||||
map.put(KEY_ALLOWCC, allowcc);
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -452,6 +462,7 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
channel.chatRange = castWithDefault(data.get(KEY_RANGE), 0);
|
||||
channel.banExpires = castToChannelPlayerLongMap(data.get(KEY_BAN_EXPIRES));
|
||||
channel.muteExpires = castToChannelPlayerLongMap(data.get(KEY_MUTE_EXPIRES));
|
||||
channel.allowcc = castWithDefault(data.get(KEY_ALLOWCC), true);
|
||||
return channel;
|
||||
}
|
||||
|
||||
@@ -664,9 +675,8 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
// ブロードキャストチャンネルなら、
|
||||
// 現在サーバーに接続している全プレイヤーをメンバーとして返す
|
||||
if ( isBroadcastChannel() ) {
|
||||
Player[] players = Bukkit.getOnlinePlayers();
|
||||
List<ChannelPlayer> mem = new ArrayList<ChannelPlayer>();
|
||||
for ( Player p : players ) {
|
||||
for ( Player p : Bukkit.getOnlinePlayers() ) {
|
||||
mem.add(ChannelPlayer.getChannelPlayer(p));
|
||||
}
|
||||
return mem;
|
||||
@@ -803,6 +813,22 @@ public abstract class Channel implements ConfigurationSerializable {
|
||||
return chatRange;
|
||||
}
|
||||
|
||||
/**
|
||||
* カラーコードが使用可能な設定かどうか
|
||||
* @return allowccを返す
|
||||
*/
|
||||
public boolean isAllowCC() {
|
||||
return allowcc;
|
||||
}
|
||||
|
||||
/**
|
||||
* カラーコードの使用可否を設定する
|
||||
* @param allowcc 使用可否
|
||||
*/
|
||||
public void setAllowCC(boolean allowcc) {
|
||||
this.allowcc = allowcc;
|
||||
}
|
||||
|
||||
/**
|
||||
* チャンネルの情報をファイルに保存する。
|
||||
* @return 保存をしたかどうか。
|
||||
|
||||
@@ -118,7 +118,10 @@ public class ChannelImpl extends Channel {
|
||||
String msgFormat = replaceKeywords(getFormat(), player);
|
||||
|
||||
// カラーコード置き換え
|
||||
maskedMessage = Utility.replaceColorCode(maskedMessage);
|
||||
// チャンネルで許可されていて、発言者がパーミッションを持っている場合に置き換える
|
||||
if ( isAllowCC() && player.hasPermission("lunachat.allowcc") ) {
|
||||
maskedMessage = Utility.replaceColorCode(maskedMessage);
|
||||
}
|
||||
|
||||
// イベントコール
|
||||
LunaChatChannelChatEvent event =
|
||||
@@ -132,9 +135,10 @@ public class ChannelImpl extends Channel {
|
||||
maskedMessage = event.getNgMaskedMessage();
|
||||
|
||||
// 2byteコードを含むか、半角カタカナのみなら、Japanize変換は行わない
|
||||
String kanaTemp = Utility.stripColor(maskedMessage);
|
||||
if ( !skipJapanize &&
|
||||
( message.getBytes().length > message.length() ||
|
||||
message.matches("[ \\uFF61-\\uFF9F]+") ) ) {
|
||||
( kanaTemp.getBytes().length > kanaTemp.length() ||
|
||||
kanaTemp.matches("[ \\uFF61-\\uFF9F]+") ) ) {
|
||||
skipJapanize = true;
|
||||
}
|
||||
|
||||
@@ -150,11 +154,11 @@ public class ChannelImpl extends Channel {
|
||||
String jpFormat;
|
||||
String messageFormat = null;
|
||||
if ( lineType == 1 ) {
|
||||
jpFormat = config.getJapanizeLine1Format();
|
||||
jpFormat = Utility.replaceColorCode(config.getJapanizeLine1Format());
|
||||
messageFormat = msgFormat;
|
||||
isIncludeSyncChat = false;
|
||||
} else {
|
||||
jpFormat = config.getJapanizeLine2Format();
|
||||
jpFormat = Utility.replaceColorCode(config.getJapanizeLine2Format());
|
||||
}
|
||||
|
||||
// タスクを作成しておく
|
||||
@@ -181,10 +185,12 @@ public class ChannelImpl extends Channel {
|
||||
if ( !isGlobalChannel() ) {
|
||||
getBanned().add(player);
|
||||
removeMember(player);
|
||||
String m = replaceKeywordsForSystemMessages(
|
||||
MSG_BAN_NGWORD, player.getName());
|
||||
player.sendMessage(m);
|
||||
sendMessage(null, m, null, true);
|
||||
if ( !MSG_BAN_NGWORD.equals("") ) {
|
||||
String m = replaceKeywordsForSystemMessages(
|
||||
MSG_BAN_NGWORD, player.getName());
|
||||
player.sendMessage(m);
|
||||
sendMessage(null, m, null, true);
|
||||
}
|
||||
}
|
||||
|
||||
} else if ( config.getNgwordAction() == NGWordAction.KICK ) {
|
||||
@@ -192,10 +198,12 @@ public class ChannelImpl extends Channel {
|
||||
|
||||
if ( !isGlobalChannel() ) {
|
||||
removeMember(player);
|
||||
String m = replaceKeywordsForSystemMessages(
|
||||
MSG_KICK_NGWORD, player.getName());
|
||||
player.sendMessage(m);
|
||||
sendMessage(null, m, null, true);
|
||||
if ( !MSG_KICK_NGWORD.equals("") ) {
|
||||
String m = replaceKeywordsForSystemMessages(
|
||||
MSG_KICK_NGWORD, player.getName());
|
||||
player.sendMessage(m);
|
||||
sendMessage(null, m, null, true);
|
||||
}
|
||||
}
|
||||
|
||||
} else if ( config.getNgwordAction() == NGWordAction.MUTE ) {
|
||||
@@ -203,10 +211,12 @@ public class ChannelImpl extends Channel {
|
||||
|
||||
getMuted().add(player);
|
||||
save();
|
||||
String m = replaceKeywordsForSystemMessages(
|
||||
MSG_MUTE_NGWORD, player.getName());
|
||||
player.sendMessage(m);
|
||||
sendMessage(null, m, null, true);
|
||||
if ( !MSG_MUTE_NGWORD.equals("") ) {
|
||||
String m = replaceKeywordsForSystemMessages(
|
||||
MSG_MUTE_NGWORD, player.getName());
|
||||
player.sendMessage(m);
|
||||
sendMessage(null, m, null, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -239,8 +249,10 @@ public class ChannelImpl extends Channel {
|
||||
msgFormat = msgFormat.replace("%prefix", "");
|
||||
msgFormat = msgFormat.replace("%suffix", "");
|
||||
|
||||
// カラーコード置き換え
|
||||
maskedMessage = Utility.replaceColorCode(maskedMessage);
|
||||
// カラーコード置き換え チャンネルで許可されている場合に置き換える。
|
||||
if ( isAllowCC() ) {
|
||||
maskedMessage = Utility.replaceColorCode(maskedMessage);
|
||||
}
|
||||
|
||||
// メッセージの送信
|
||||
sendMessage(null, maskedMessage, msgFormat, false);
|
||||
@@ -260,6 +272,9 @@ public class ChannelImpl extends Channel {
|
||||
}
|
||||
|
||||
String msg = Resources.get(key);
|
||||
if ( msg == null || msg.equals("") ) {
|
||||
return;
|
||||
}
|
||||
msg = replaceKeywordsForSystemMessages(msg, player.getName());
|
||||
sendMessage(null, msg, null, false);
|
||||
}
|
||||
@@ -286,7 +301,8 @@ public class ChannelImpl extends Channel {
|
||||
if ( isBroadcastChannel() ) {
|
||||
// ブロードキャストチャンネル
|
||||
|
||||
if ( isWorldRange() && player != null && player.isOnline() ) {
|
||||
if ( isWorldRange() && player != null &&
|
||||
player.isOnline() && player.getPlayer() != null ) {
|
||||
isRangeChat = true;
|
||||
World w = player.getPlayer().getWorld();
|
||||
|
||||
@@ -376,7 +392,7 @@ public class ChannelImpl extends Channel {
|
||||
}
|
||||
|
||||
// 受信者が自分以外いない場合は、メッセージを表示する
|
||||
if ( isRangeChat && (
|
||||
if ( !MSG_NO_RECIPIENT.equals("") && isRangeChat && (
|
||||
recipients.size() == 0 ||
|
||||
(recipients.size() == 1 &&
|
||||
recipients.get(0).getName().equals(player.getName()) ) ) ) {
|
||||
@@ -479,7 +495,7 @@ public class ChannelImpl extends Channel {
|
||||
buf = new StringBuffer();
|
||||
buf.append(INFO_PREFIX + ChatColor.WHITE);
|
||||
}
|
||||
buf.append(getMuted().get(i) + ",");
|
||||
buf.append(getMuted().get(i).getName() + ",");
|
||||
}
|
||||
|
||||
info.add(buf.toString());
|
||||
@@ -497,7 +513,7 @@ public class ChannelImpl extends Channel {
|
||||
buf = new StringBuffer();
|
||||
buf.append(INFO_PREFIX + ChatColor.WHITE);
|
||||
}
|
||||
buf.append(getBanned().get(i) + ",");
|
||||
buf.append(getBanned().get(i).getName() + ",");
|
||||
}
|
||||
|
||||
info.add(buf.toString());
|
||||
@@ -528,11 +544,13 @@ public class ChannelImpl extends Channel {
|
||||
save();
|
||||
|
||||
// メッセージ通知を流す
|
||||
String msg = replaceKeywords(MSG_BAN_EXPIRED, cp);
|
||||
sendMessage(null, msg, null, false);
|
||||
if ( !MSG_BAN_EXPIRED.equals("") ) {
|
||||
String msg = replaceKeywords(MSG_BAN_EXPIRED, cp);
|
||||
sendMessage(null, msg, null, false);
|
||||
}
|
||||
|
||||
if ( cp.isOnline() ) {
|
||||
msg = PREINFO + String.format(MSG_BAN_EXPIRED_PLAYER, getName());
|
||||
if ( cp.isOnline() && !MSG_BAN_EXPIRED_PLAYER.equals("") ) {
|
||||
String msg = PREINFO + String.format(MSG_BAN_EXPIRED_PLAYER, getName());
|
||||
cp.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
@@ -550,11 +568,13 @@ public class ChannelImpl extends Channel {
|
||||
save();
|
||||
|
||||
// メッセージ通知を流す
|
||||
String msg = replaceKeywords(MSG_MUTE_EXPIRED, cp);
|
||||
sendMessage(null, msg, null, false);
|
||||
if ( !MSG_MUTE_EXPIRED.equals("") ) {
|
||||
String msg = replaceKeywords(MSG_MUTE_EXPIRED, cp);
|
||||
sendMessage(null, msg, null, false);
|
||||
}
|
||||
|
||||
if ( cp.isOnline() ) {
|
||||
msg = PREINFO + String.format(MSG_MUTE_EXPIRED_PLAYER, getName());
|
||||
if ( cp.isOnline() && !MSG_MUTE_EXPIRED_PLAYER.equals("") ) {
|
||||
String msg = PREINFO + String.format(MSG_MUTE_EXPIRED_PLAYER, getName());
|
||||
cp.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
@@ -599,11 +619,16 @@ public class ChannelImpl extends Channel {
|
||||
msg = msg.replace("%suffix", player.getSuffix());
|
||||
}
|
||||
|
||||
if ( msg.contains("%world") ) {
|
||||
msg = msg.replace("%world", player.getWorldName());
|
||||
}
|
||||
|
||||
} else {
|
||||
msg = msg.replace("%username", "");
|
||||
msg = msg.replace("%player", "");
|
||||
msg = msg.replace("%prefix", "");
|
||||
msg = msg.replace("%suffix", "");
|
||||
msg = msg.replace("%world", "");
|
||||
}
|
||||
|
||||
return Utility.replaceColorCode(msg);
|
||||
|
||||
@@ -385,13 +385,16 @@ public class ChannelManager implements LunaChatAPI {
|
||||
if ( channel != null ) {
|
||||
|
||||
// 強制解散のメッセージを、残ったメンバーに流す
|
||||
String message = new String(MSG_BREAKUP);
|
||||
message = message.replace("%ch", channel.getName());
|
||||
message = message.replace("%color", channel.getColorCode());
|
||||
for ( ChannelPlayer cp : channel.getMembers() ) {
|
||||
cp.sendMessage(message);
|
||||
if ( !channel.isPersonalChat() && !MSG_BREAKUP.equals("") ) {
|
||||
String message = new String(MSG_BREAKUP);
|
||||
message = message.replace("%ch", channel.getName());
|
||||
message = message.replace("%color", channel.getColorCode());
|
||||
for ( ChannelPlayer cp : channel.getMembers() ) {
|
||||
cp.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
// チャンネルの削除
|
||||
channel.remove();
|
||||
channels.remove(channelName);
|
||||
}
|
||||
@@ -465,17 +468,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}");
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,9 @@
|
||||
*/
|
||||
package com.github.ucchyocean.lc.channel;
|
||||
|
||||
import org.bukkit.command.BlockCommandSender;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.github.ucchyocean.lc.Utility;
|
||||
@@ -59,11 +61,24 @@ public abstract class ChannelPlayer implements Comparable<ChannelPlayer> {
|
||||
public abstract Player getPlayer();
|
||||
|
||||
/**
|
||||
* 指定されたPlayerと同一かどうかを返す
|
||||
* @param player プレイヤー
|
||||
* 発言者が今いるワールドのワールド名を取得する
|
||||
* @return ワールド名
|
||||
*/
|
||||
public abstract String getWorldName();
|
||||
|
||||
/**
|
||||
* 指定されたパーミッションノードの権限を持っているかどうかを取得する
|
||||
* @param node パーミッションノード
|
||||
* @return 権限を持っているかどうか
|
||||
*/
|
||||
public abstract boolean hasPermission(String node);
|
||||
|
||||
/**
|
||||
* 指定されたCommandSenderと同一かどうかを返す
|
||||
* @param sender
|
||||
* @return 同一かどうか
|
||||
*/
|
||||
public abstract boolean equals(Player player);
|
||||
public abstract boolean equals(CommandSender sender);
|
||||
|
||||
/**
|
||||
* 文字列表現を返す
|
||||
@@ -125,8 +140,11 @@ public abstract class ChannelPlayer implements Comparable<ChannelPlayer> {
|
||||
public static ChannelPlayer getChannelPlayer(CommandSender sender) {
|
||||
if ( sender == null ) {
|
||||
return null;
|
||||
}
|
||||
if ( Utility.isCB178orLater() ) {
|
||||
} else if ( sender instanceof BlockCommandSender ) {
|
||||
return new ChannelPlayerBlock((BlockCommandSender)sender);
|
||||
} else if ( sender instanceof ConsoleCommandSender ) {
|
||||
return new ChannelPlayerConsole((ConsoleCommandSender)sender);
|
||||
} else if ( Utility.isCB178orLater() ) {
|
||||
return ChannelPlayerUUID.getChannelPlayer(sender);
|
||||
}
|
||||
return new ChannelPlayerName(sender.getName());
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* @author ucchy
|
||||
* @license LGPLv3
|
||||
* @copyright Copyright ucchy 2014
|
||||
*/
|
||||
package com.github.ucchyocean.lc.channel;
|
||||
|
||||
import org.bukkit.command.BlockCommandSender;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* コマンドブロック
|
||||
* @author ucchy
|
||||
*/
|
||||
public class ChannelPlayerBlock extends ChannelPlayer {
|
||||
|
||||
BlockCommandSender sender;
|
||||
|
||||
/**
|
||||
* コンストラクタ
|
||||
* @param sender コマンドブロック
|
||||
*/
|
||||
public ChannelPlayerBlock(BlockCommandSender sender) {
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
/**
|
||||
* オンラインかどうか
|
||||
* @return 常にtrue
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#isOnline()
|
||||
*/
|
||||
@Override
|
||||
public boolean isOnline() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* プレイヤー名を返す
|
||||
* @return プレイヤー名
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return sender.getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* プレイヤー表示名を返す
|
||||
* @return プレイヤー表示名
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getDisplayName()
|
||||
*/
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return sender.getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* プレフィックスを返す
|
||||
* @return 常に空文字列
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getPrefix()
|
||||
*/
|
||||
@Override
|
||||
public String getPrefix() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* サフィックスを返す
|
||||
* @return 常に空文字列
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getSuffix()
|
||||
*/
|
||||
@Override
|
||||
public String getSuffix() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* メッセージを送る、実際は何もせずにメッセージを捨てる
|
||||
* @param message
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#sendMessage(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void sendMessage(String message) {
|
||||
// do nothing.
|
||||
}
|
||||
|
||||
/**
|
||||
* BukkitのPlayerを取得する
|
||||
* @return 常にnullが返される
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getPlayer()
|
||||
*/
|
||||
@Override
|
||||
public Player getPlayer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 発言者が今いるワールドのワールド名を取得する
|
||||
* @return 常に "-" が返される。
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getWorldName()
|
||||
*/
|
||||
@Override
|
||||
public String getWorldName() {
|
||||
return "-";
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定されたパーミッションノードの権限を持っているかどうかを取得する
|
||||
* @param node パーミッションノード
|
||||
* @return 権限を持っているかどうか
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#hasPermission(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean hasPermission(String node) {
|
||||
return sender.hasPermission(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定されたCommandSenderと同一かどうかを返す
|
||||
* @param sender
|
||||
* @return 同一かどうか
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#equals(org.bukkit.entity.Player)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(CommandSender sender) {
|
||||
return this.sender.equals(sender);
|
||||
}
|
||||
|
||||
/**
|
||||
* IDを返す
|
||||
* @return 名前をそのまま返す
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getID()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* @author ucchy
|
||||
* @license LGPLv3
|
||||
* @copyright Copyright ucchy 2014
|
||||
*/
|
||||
package com.github.ucchyocean.lc.channel;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* コンソール
|
||||
* @author ucchy
|
||||
*/
|
||||
public class ChannelPlayerConsole extends ChannelPlayer {
|
||||
|
||||
ConsoleCommandSender sender;
|
||||
|
||||
/**
|
||||
* コンストラクタ
|
||||
* @param sender コンソール
|
||||
*/
|
||||
public ChannelPlayerConsole(ConsoleCommandSender sender) {
|
||||
this.sender = sender;
|
||||
}
|
||||
|
||||
/**
|
||||
* オンラインかどうか
|
||||
* @return 常にtrue
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#isOnline()
|
||||
*/
|
||||
@Override
|
||||
public boolean isOnline() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* プレイヤー名を返す
|
||||
* @return プレイヤー名
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return sender.getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* プレイヤー表示名を返す
|
||||
* @return プレイヤー表示名
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getDisplayName()
|
||||
*/
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return sender.getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* プレフィックスを返す
|
||||
* @return 常に空文字列
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getPrefix()
|
||||
*/
|
||||
@Override
|
||||
public String getPrefix() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* サフィックスを返す
|
||||
* @return 常に空文字列
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getSuffix()
|
||||
*/
|
||||
@Override
|
||||
public String getSuffix() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* メッセージを送る
|
||||
* @param message 送信するメッセージ
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#sendMessage(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void sendMessage(String message) {
|
||||
sender.sendMessage(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* BukkitのPlayerを取得する
|
||||
* @return 常にnullが返される
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getPlayer()
|
||||
*/
|
||||
@Override
|
||||
public Player getPlayer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 発言者が今いるワールドのワールド名を取得する
|
||||
* @return 常に "-" が返される。
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getWorldName()
|
||||
*/
|
||||
@Override
|
||||
public String getWorldName() {
|
||||
return "-";
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定されたパーミッションノードの権限を持っているかどうかを取得する
|
||||
* @param node パーミッションノード
|
||||
* @return 権限を持っているかどうか
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#hasPermission(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean hasPermission(String node) {
|
||||
return sender.hasPermission(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定されたCommandSenderと同一かどうかを返す
|
||||
* @param sender
|
||||
* @return 同一かどうか
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#equals(org.bukkit.entity.Player)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(CommandSender sender) {
|
||||
return this.sender.equals(sender);
|
||||
}
|
||||
|
||||
/**
|
||||
* IDを返す
|
||||
* @return 名前をそのまま返す
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getID()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
package com.github.ucchyocean.lc.channel;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.github.ucchyocean.lc.LunaChat;
|
||||
@@ -122,16 +123,47 @@ public class ChannelPlayerName extends ChannelPlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定されたPlayerと同一かどうかを返す
|
||||
* @param player プレイヤー
|
||||
* 発言者が今いるワールドのワールド名を取得する
|
||||
* @return ワールド名
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getWorldName()
|
||||
*/
|
||||
@Override
|
||||
public String getWorldName() {
|
||||
Player player = getPlayer();
|
||||
if ( player != null ) {
|
||||
return player.getWorld().getName();
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定されたパーミッションノードの権限を持っているかどうかを取得する
|
||||
* @param node パーミッションノード
|
||||
* @return 権限を持っているかどうか
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#hasPermission(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean hasPermission(String node) {
|
||||
Player player = getPlayer();
|
||||
if ( player == null ) {
|
||||
return false;
|
||||
} else {
|
||||
return player.hasPermission(node);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定されたCommandSenderと同一かどうかを返す
|
||||
* @param sender
|
||||
* @return 同一かどうか
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#equals(org.bukkit.entity.Player)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Player player) {
|
||||
if ( player == null ) {
|
||||
public boolean equals(CommandSender sender) {
|
||||
if ( sender == null || !(sender instanceof Player) ) {
|
||||
return false;
|
||||
}
|
||||
Player player = (Player)sender;
|
||||
return name.equals(player.getName());
|
||||
}
|
||||
|
||||
|
||||
@@ -173,16 +173,47 @@ public class ChannelPlayerUUID extends ChannelPlayer {
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定されたPlayerと同一かどうかを返す
|
||||
* @param player プレイヤー
|
||||
* 発言者が今いるワールドのワールド名を取得する
|
||||
* @return ワールド名
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#getWorldName()
|
||||
*/
|
||||
@Override
|
||||
public String getWorldName() {
|
||||
Player player = getPlayer();
|
||||
if ( player != null ) {
|
||||
return player.getWorld().getName();
|
||||
}
|
||||
return "-";
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定されたパーミッションノードの権限を持っているかどうかを取得する
|
||||
* @param node パーミッションノード
|
||||
* @return 権限を持っているかどうか
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#hasPermission(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean hasPermission(String node) {
|
||||
Player player = getPlayer();
|
||||
if ( player == null ) {
|
||||
return false;
|
||||
} else {
|
||||
return player.hasPermission(node);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定されたCommandSenderと同一かどうかを返す
|
||||
* @param sender
|
||||
* @return 同一かどうか
|
||||
* @see com.github.ucchyocean.lc.channel.ChannelPlayer#equals(org.bukkit.entity.Player)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Player player) {
|
||||
if ( player == null ) {
|
||||
public boolean equals(CommandSender sender) {
|
||||
if ( sender == null || !(sender instanceof Player) ) {
|
||||
return false;
|
||||
}
|
||||
Player player = (Player)sender;
|
||||
return id.equals(player.getUniqueId());
|
||||
}
|
||||
|
||||
|
||||
@@ -95,8 +95,8 @@ public class DelayedJapanizeConvertTask extends BukkitRunnable {
|
||||
}
|
||||
}
|
||||
|
||||
// URL削除
|
||||
String deletedURL = org.replaceAll(REGEX_URL, " ");
|
||||
// カラーコード削除、URL削除
|
||||
String deletedURL = Utility.stripColor(org.replaceAll(REGEX_URL, " "));
|
||||
|
||||
// キーワードをロック
|
||||
int index = 0;
|
||||
@@ -146,7 +146,6 @@ public class DelayedJapanizeConvertTask extends BukkitRunnable {
|
||||
// フォーマットする
|
||||
result = format.replace("%msg", org);
|
||||
result = result.replace("%japanize", japanized);
|
||||
result = Utility.replaceColorCode(result);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -106,14 +107,14 @@ public class JoinCommand extends SubCommandAbst {
|
||||
|
||||
// チャンネルが存在するかどうかをチェックする
|
||||
if ( !api.isExistChannel(channelName) ) {
|
||||
if (config.getGlobalChannel().equals("") &&
|
||||
if ( config.getGlobalChannel().equals("") &&
|
||||
channelName.equals(config.getGlobalMarker()) ) {
|
||||
// グローバルチャンネル設定が無くて、指定チャンネルがマーカーの場合、
|
||||
// 発言先を削除して、グローバルチャンネルにする
|
||||
|
||||
api.removeDefaultChannel(player.getName());
|
||||
sendResourceMessage(sender, PREINFO, "cmdmsgSet", "グローバル");
|
||||
if (message.length() > 0) {
|
||||
if ( message.length() > 0 && player.getPlayer() != null ) {
|
||||
player.getPlayer().chat(config.getGlobalMarker() + message.toString());
|
||||
}
|
||||
return true;
|
||||
@@ -122,7 +123,7 @@ public class JoinCommand extends SubCommandAbst {
|
||||
// 存在しないチャットには、チャンネルを作って入る設定の場合
|
||||
|
||||
// 使用可能なチャンネル名かどうかをチェックする
|
||||
if ( !api.checkForChannelName(channelName) ) {
|
||||
if ( !LunaChat.checkForChannelName(channelName) ) {
|
||||
sendResourceMessage(sender, PREINFO,
|
||||
"errmsgCannotUseForChannel", channelName);
|
||||
return true;
|
||||
|
||||
@@ -173,7 +173,12 @@ public class LunaChatCommand implements CommandExecutor {
|
||||
*/
|
||||
private void sendResourceMessage(CommandSender sender, String pre,
|
||||
String key, Object... args) {
|
||||
String msg = String.format(pre + Resources.get(key), args);
|
||||
|
||||
String org = Resources.get(key);
|
||||
if ( org == null || org.equals("") ) {
|
||||
return;
|
||||
}
|
||||
String msg = String.format(pre + org, args);
|
||||
sender.sendMessage(msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,12 @@ public class LunaChatJapanizeCommand implements CommandExecutor {
|
||||
*/
|
||||
protected void sendResourceMessage(CommandSender sender, String pre,
|
||||
String key, Object... args) {
|
||||
String msg = String.format(pre + Resources.get(key), args);
|
||||
|
||||
String org = Resources.get(key);
|
||||
if ( org == null || org.equals("") ) {
|
||||
return;
|
||||
}
|
||||
String msg = String.format(pre + org, args);
|
||||
sender.sendMessage(msg);
|
||||
}
|
||||
|
||||
@@ -123,7 +128,12 @@ public class LunaChatJapanizeCommand implements CommandExecutor {
|
||||
*/
|
||||
protected void sendResourceMessage(ChannelPlayer cp, String pre,
|
||||
String key, Object... args) {
|
||||
String msg = String.format(pre + Resources.get(key), args);
|
||||
|
||||
String org = Resources.get(key);
|
||||
if ( org == null || org.equals("") ) {
|
||||
return;
|
||||
}
|
||||
String msg = String.format(pre + org, args);
|
||||
cp.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@ package com.github.ucchyocean.lc.command;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.github.ucchyocean.lc.LunaChat;
|
||||
import com.github.ucchyocean.lc.LunaChatAPI;
|
||||
@@ -31,11 +30,7 @@ public class LunaChatMessageCommand implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command command,
|
||||
String label, String[] args) {
|
||||
|
||||
// プレイヤーでなければ終了する
|
||||
if (!(sender instanceof Player)) {
|
||||
sendResourceMessage(sender, PREERR, "errmsgIngame");
|
||||
return true;
|
||||
}
|
||||
// senderからChannelPlayerを作成する
|
||||
ChannelPlayer inviter = ChannelPlayer.getChannelPlayer(sender);
|
||||
|
||||
// 引数が無ければ、usageを表示して終了する
|
||||
@@ -60,6 +55,7 @@ public class LunaChatMessageCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
// メッセージを送信する
|
||||
sendTellMessage(inviter, invitedName, message.toString().trim());
|
||||
return true;
|
||||
}
|
||||
@@ -132,7 +128,12 @@ public class LunaChatMessageCommand implements CommandExecutor {
|
||||
*/
|
||||
protected void sendResourceMessage(CommandSender sender, String pre,
|
||||
String key, Object... args) {
|
||||
String msg = String.format(pre + Resources.get(key), args);
|
||||
|
||||
String org = Resources.get(key);
|
||||
if ( org == null || org.equals("") ) {
|
||||
return;
|
||||
}
|
||||
String msg = String.format(pre + org, args);
|
||||
sender.sendMessage(msg);
|
||||
}
|
||||
|
||||
@@ -145,7 +146,12 @@ public class LunaChatMessageCommand implements CommandExecutor {
|
||||
*/
|
||||
protected void sendResourceMessage(ChannelPlayer cp, String pre,
|
||||
String key, Object... args) {
|
||||
String msg = String.format(pre + Resources.get(key), args);
|
||||
|
||||
String org = Resources.get(key);
|
||||
if ( org == null || org.equals("") ) {
|
||||
return;
|
||||
}
|
||||
String msg = String.format(pre + org, args);
|
||||
cp.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@ package com.github.ucchyocean.lc.command;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.github.ucchyocean.lc.Resources;
|
||||
import com.github.ucchyocean.lc.channel.ChannelPlayer;
|
||||
@@ -28,11 +27,7 @@ public class LunaChatReplyCommand extends LunaChatMessageCommand {
|
||||
public boolean onCommand(CommandSender sender, Command command,
|
||||
String label, String[] args) {
|
||||
|
||||
// プレイヤーでなければ終了する
|
||||
if (!(sender instanceof Player)) {
|
||||
sendResourceMessage(sender, PREERR, "errmsgIngame");
|
||||
return true;
|
||||
}
|
||||
// senderからChannelPlayerを作成する
|
||||
ChannelPlayer inviter = ChannelPlayer.getChannelPlayer(sender);
|
||||
|
||||
// 会話相手を履歴から取得する
|
||||
|
||||
@@ -262,6 +262,34 @@ public class OptionCommand extends SubCommandAbst {
|
||||
}
|
||||
}
|
||||
|
||||
if ( options.containsKey("allowcc") ) {
|
||||
// カラーコード使用可否
|
||||
|
||||
String pnode = PERMISSION_NODE + ".allowcc";
|
||||
if ( !sender.hasPermission(pnode) ) {
|
||||
sendResourceMessage(sender, PREERR,
|
||||
"errmsgNotPermission", pnode);
|
||||
} else {
|
||||
|
||||
String value = options.get("allowcc");
|
||||
|
||||
if ( value.equals("") || value.equalsIgnoreCase("false") ) {
|
||||
channel.setAllowCC(false);
|
||||
sendResourceMessage(sender, PREINFO,
|
||||
"cmdmsgOption", "allowcc", "false");
|
||||
setOption = true;
|
||||
} else if ( value.equalsIgnoreCase("true") ) {
|
||||
channel.setAllowCC(true);
|
||||
sendResourceMessage(sender, PREINFO,
|
||||
"cmdmsgOption", "allowcc", "true");
|
||||
setOption = true;
|
||||
} else {
|
||||
sendResourceMessage(sender, PREERR,
|
||||
"errmsgInvalidBooleanOption", "allowcc");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !channel.isGlobalChannel() ) {
|
||||
|
||||
if ( options.containsKey("password") ) {
|
||||
|
||||
@@ -62,6 +62,9 @@ public abstract class SubCommandAbst {
|
||||
Channel channel, String key, ChannelPlayer player) {
|
||||
|
||||
String msg = Resources.get(key);
|
||||
if ( msg == null || msg.equals("") ) {
|
||||
return;
|
||||
}
|
||||
msg = msg.replace("%ch", channel.getName());
|
||||
msg = msg.replace("%color", channel.getColorCode());
|
||||
if ( player != null ) {
|
||||
@@ -87,6 +90,9 @@ public abstract class SubCommandAbst {
|
||||
Channel channel, String key, ChannelPlayer player, int minutes) {
|
||||
|
||||
String msg = Resources.get(key);
|
||||
if ( msg == null || msg.equals("") ) {
|
||||
return;
|
||||
}
|
||||
msg = msg.replace("%ch", channel.getName());
|
||||
msg = msg.replace("%color", channel.getColorCode());
|
||||
msg = msg.replace("%d", String.valueOf(minutes));
|
||||
@@ -110,7 +116,12 @@ public abstract class SubCommandAbst {
|
||||
*/
|
||||
protected void sendResourceMessage(
|
||||
CommandSender sender, String pre, String key, Object... args) {
|
||||
String msg = String.format(pre + Resources.get(key), args);
|
||||
|
||||
String org = Resources.get(key);
|
||||
if ( org == null || org.equals("") ) {
|
||||
return;
|
||||
}
|
||||
String msg = String.format(pre + org, args);
|
||||
sender.sendMessage(msg);
|
||||
}
|
||||
|
||||
@@ -123,7 +134,12 @@ public abstract class SubCommandAbst {
|
||||
*/
|
||||
protected void sendResourceMessage(
|
||||
ChannelPlayer cp, String pre, String key, Object... args) {
|
||||
String msg = String.format(pre + Resources.get(key), args);
|
||||
|
||||
String org = Resources.get(key);
|
||||
if ( org == null || org.equals("") ) {
|
||||
return;
|
||||
}
|
||||
String msg = String.format(pre + org, args);
|
||||
cp.sendMessage(msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
# @copyright Copyright ucchy 2013
|
||||
|
||||
|
||||
# -------------------- チャンネルチャット設定 --------------------
|
||||
|
||||
# チャンネルチャット機能を利用可能にするかどうか
|
||||
# Japanize機能のみを利用したい場合は、falseにしてください。
|
||||
enableChannelChat: true
|
||||
|
||||
# -------------------- チャンネルチャット設定 --------------------
|
||||
|
||||
# チャンネルチャットに入っていない人の発言を、グローバルとして扱うかどうか
|
||||
noJoinAsGlobal: true
|
||||
|
||||
@@ -47,6 +47,15 @@ forceJoinChannels: []
|
||||
formatConstraint: ['%username', '%msg']
|
||||
|
||||
# チャンネルを作成したときに、デフォルトで設定されるフォーマット設定。
|
||||
# フォーマット設定には、下記のキーワードが使用できます。
|
||||
# %ch : チャンネル名
|
||||
# %color : チャンネルカラー
|
||||
# %username : 発言者表示名
|
||||
# %player : 発言者ID
|
||||
# %world : 発言したワールド名
|
||||
# %prefix : プレフィックス(VaultとPermissionsExが導入されている場合に置き換えられます)
|
||||
# %suffix : サフィックス(VaultとPermissionsExが導入されている場合に置き換えられます)
|
||||
# %msg : 発言内容(Japanize変換された場合は、Japanize結果を含みます。)
|
||||
defaultFormat: '&f[%color%ch&f]%prefix%username%suffix&a:&f %msg'
|
||||
|
||||
|
||||
@@ -54,6 +63,15 @@ defaultFormat: '&f[%color%ch&f]%prefix%username%suffix&a:&f %msg'
|
||||
|
||||
# /tell や /msg や /r コマンドでプライベートメッセージを送信するときに、
|
||||
# 適用されるフォーマット設定。
|
||||
# フォーマット設定には、下記のキーワードが使用できます。
|
||||
# %ch : チャンネル名(「%player>%to」と同一です。)
|
||||
# %username : 発言者表示名
|
||||
# %player : 発言者ID
|
||||
# %to : 発言の相手(受信者)のID
|
||||
# %world : 発言したワールド名
|
||||
# %prefix : プレフィックス(VaultとPermissionsExが導入されている場合に置き換えられます)
|
||||
# %suffix : サフィックス(VaultとPermissionsExが導入されている場合に置き換えられます)
|
||||
# %msg : 発言内容(Japanize変換された場合は、Japanize結果を含みます。)
|
||||
defaultFormatForPrivateMessage: '&7[%player > %to] %msg'
|
||||
|
||||
|
||||
@@ -87,11 +105,14 @@ ngword: []
|
||||
# mute : NGワードをマスクしたのち、発言したプレイヤーをチャンネルからMuteする
|
||||
# kick : NGワードをマスクしたのち、発言したプレイヤーをチャンネルからキックする
|
||||
# ban : NGワードをマスクしたのち、発言したプレイヤーをチャンネルからBANする
|
||||
# ※ 通常チャット(非チャンネルチャット)の場合は、
|
||||
# kickやbanを設定しても、マスクのみが実行されます。
|
||||
ngwordAction: mask
|
||||
|
||||
|
||||
|
||||
# -------------------- チャット装飾設定 --------------------
|
||||
|
||||
# チャンネルチャット機能を利用しないユーザーのための設定です。
|
||||
|
||||
# 通常チャット(非チャンネルチャット)の装飾を、LunaChatから行うかどうか。
|
||||
@@ -99,8 +120,18 @@ ngwordAction: mask
|
||||
enableNormalChatMessageFormat: true
|
||||
|
||||
# チャット装飾のフォーマット設定。
|
||||
# フォーマット設定には、下記のキーワードが使用できます。
|
||||
# %username : 発言者表示名
|
||||
# %world : 発言したワールド名
|
||||
# %prefix : プレフィックス(VaultとPermissionsExが導入されている場合に置き換えられます)
|
||||
# %suffix : サフィックス(VaultとPermissionsExが導入されている場合に置き換えられます)
|
||||
# %msg : 発言内容(Japanize変換された場合は、Japanize結果を含みます。)
|
||||
normalChatMessageFormat: '%prefix&f<%username>%suffix&f %msg'
|
||||
|
||||
# 通常チャット(非チャンネルチャット)で、カラーコード(&aや&bなど)を
|
||||
# 使用可能にするかどうか。falseに設定すると、カラーコードは変換されません。
|
||||
enableNormalChatColorCode: true
|
||||
|
||||
|
||||
|
||||
# -------------------- Japanize変換設定 --------------------
|
||||
@@ -124,9 +155,15 @@ japanizeType: GoogleIME
|
||||
japanizeDisplayLine: 1
|
||||
|
||||
# japanizeDisplayLine が 1 のときの、表示フォーマットを設定する。
|
||||
# フォーマット設定には、下記のキーワードが使用できます。
|
||||
# %msg : 元の発言内容
|
||||
# %japanize : Japanize変換された発言内容
|
||||
japanizeLine1Format: '%msg &7(%japanize)'
|
||||
|
||||
# japanizeDisplayLine が 2 のときの、2行目の表示フォーマットを設定する。
|
||||
# フォーマット設定には、下記のキーワードが使用できます。
|
||||
# %msg : 元の発言内容
|
||||
# %japanize : Japanize変換された発言内容
|
||||
japanizeLine2Format: '&6[JP] %japanize'
|
||||
|
||||
# 発言に含まれているプレイヤー名を、Japanize変換から除外するかどうかを設定する。
|
||||
|
||||
@@ -127,6 +127,9 @@ permissions:
|
||||
lunachat.japanize:
|
||||
description: lunachatのjapanizeオンオフ設定コマンドの使用権限
|
||||
default: true
|
||||
lunachat.allowcc:
|
||||
description: チャットにおけるカラーコードの使用権限
|
||||
default: true
|
||||
lunachat.*:
|
||||
children:
|
||||
lunachat.join: true
|
||||
@@ -152,6 +155,7 @@ permissions:
|
||||
lunachat.reply: true
|
||||
lunachat.help: true
|
||||
lunachat.japanize: true
|
||||
lunachat.allowcc: true
|
||||
description: 一般ユーザー向けの全コマンドの使用権限
|
||||
|
||||
lunachat.option.description:
|
||||
@@ -172,6 +176,9 @@ permissions:
|
||||
lunachat.option.visible:
|
||||
description: visibleオプション設定コマンドの使用権限
|
||||
default: true
|
||||
lunachat.option.allowcc:
|
||||
description: allowccオプション設定コマンドの使用権限
|
||||
default: true
|
||||
lunachat.option.*:
|
||||
children:
|
||||
lunachat.option.description: true
|
||||
@@ -180,6 +187,7 @@ permissions:
|
||||
lunachat.option.range: true
|
||||
lunachat.option.password: true
|
||||
lunachat.option.visible: true
|
||||
lunachat.option.allowcc: true
|
||||
description: オプション設定の全コマンドの使用権限
|
||||
|
||||
lunachat-admin.mod-all-channels:
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする