コミットを比較
| 作成者 | SHA1 | 日付 | |
|---|---|---|---|
|
|
bc892499b1 | ||
|
|
0285630a95 | ||
|
|
d926068e9a | ||
|
|
8eb47f3936 | ||
|
|
4fddd66bef | ||
|
|
c2512d0de2 | ||
|
|
680464636b | ||
|
|
49a514b1ac |
検索条件に一致するファイルはありません
バイナリ
バイナリファイルは表示されません。
@@ -2,8 +2,8 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.github.ucchyocean</groupId>
|
||||
<artifactId>LunaChat</artifactId>
|
||||
<version>2.8.3</version>
|
||||
<description>チャンネルチャットプラグイン</description>
|
||||
<version>2.8.8</version>
|
||||
<description>A powerfull chat channel plugin with IME (Kana-Kanji conversion) support</description>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
@@ -21,7 +21,7 @@
|
||||
<repository>
|
||||
<id>internal.repo</id>
|
||||
<name>Temporary Staging Repository</name>
|
||||
<url>file://${project.build.directory}/mvn-repo</url>
|
||||
<url>file://${basedir}/../mvn-repo</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.5.1</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
@@ -45,6 +47,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.10.4</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<encoding>UTF-8</encoding>
|
||||
@@ -54,14 +57,14 @@
|
||||
<nohelp>true</nohelp>
|
||||
<links>
|
||||
<link>http://docs.oracle.com/javase/6/docs/api/</link>
|
||||
<link>http://jd.bukkit.org/dev/apidocs/</link>
|
||||
<link>https://hub.spigotmc.org/javadocs/bukkit/</link>
|
||||
</links>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<version>2.6</version>
|
||||
<configuration>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
<descriptors>
|
||||
@@ -82,14 +85,14 @@
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>bukkit-repo</id>
|
||||
<name>Craft Bukkit Maven Repository</name>
|
||||
<url>http://repo.bukkit.org/content/groups/public</url>
|
||||
<id>spigot-repo</id>
|
||||
<name>Spigot Maven Repository</name>
|
||||
<url>https://hub.spigotmc.org/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>vault-repo</id>
|
||||
<name>Vault Repository</name>
|
||||
<url>http://nexus.theyeticave.net/content/repositories/pub_releases</url>
|
||||
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>mikeprimm-repo</id>
|
||||
@@ -101,11 +104,6 @@
|
||||
<name>Multiverse repository</name>
|
||||
<url>http://repo.onarandombox.com/content/groups/public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<name>Spigot Maven Repository</name>
|
||||
<url>https://hub.spigotmc.org/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>minebuilders-repo</id>
|
||||
<name>HawkEye Reloaded repository</name>
|
||||
@@ -116,40 +114,60 @@
|
||||
<name>MD5 repository</name>
|
||||
<url>http://repo.md-5.net/content/repositories/releases</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>dhmc-rep</id>
|
||||
<name>Prism repository</name>
|
||||
<url>http://dhmc.us:8081/nexus/content/repositories/releases/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.9.4-R0.1-SNAPSHOT</version>
|
||||
<version>1.10.2-R0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
<artifactId>VaultAPI</artifactId>
|
||||
<version>1.6</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dynmap</groupId>
|
||||
<artifactId>dynmap-api</artifactId>
|
||||
<version>2.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>uk.co.oliwali</groupId>
|
||||
<artifactId>HawkEye</artifactId>
|
||||
<version>1.7.2</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${basedir}/lib/HawkEye.jar</systemPath>
|
||||
<optional>true</optional>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.dthielke.herochat</groupId>
|
||||
<artifactId>Herochat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.onarandombox.multiversecore</groupId>
|
||||
<artifactId>Multiverse-Core</artifactId>
|
||||
<version>2.5</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>1.5.00</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.botsko</groupId>
|
||||
<artifactId>prism</artifactId>
|
||||
<version>2.0.6</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -18,6 +18,7 @@ import com.github.ucchyocean.lc.bridge.DynmapBridge;
|
||||
import com.github.ucchyocean.lc.bridge.HawkEyeBridge;
|
||||
import com.github.ucchyocean.lc.bridge.McMMOBridge;
|
||||
import com.github.ucchyocean.lc.bridge.MultiverseCoreBridge;
|
||||
import com.github.ucchyocean.lc.bridge.PrismBridge;
|
||||
import com.github.ucchyocean.lc.bridge.VaultChatBridge;
|
||||
import com.github.ucchyocean.lc.channel.ChannelManager;
|
||||
import com.github.ucchyocean.lc.command.LunaChatCommand;
|
||||
@@ -40,6 +41,7 @@ public class LunaChat extends JavaPlugin {
|
||||
private DynmapBridge dynmap;
|
||||
private HawkEyeBridge hawkeye;
|
||||
private MultiverseCoreBridge multiverse;
|
||||
private PrismBridge prism;
|
||||
|
||||
private ExpireCheckTask expireCheckerTask;
|
||||
private LunaChatLogger normalChatLogger;
|
||||
@@ -98,6 +100,11 @@ public class LunaChat extends JavaPlugin {
|
||||
getServer().getPluginManager().registerEvents(new McMMOBridge(), this);
|
||||
}
|
||||
|
||||
// Prismのロード
|
||||
if ( getServer().getPluginManager().isPluginEnabled("Prism") ) {
|
||||
prism = PrismBridge.load();
|
||||
}
|
||||
|
||||
// リスナーの登録
|
||||
getServer().getPluginManager().registerEvents(new PlayerListener(), this);
|
||||
|
||||
@@ -231,6 +238,14 @@ public class LunaChat extends JavaPlugin {
|
||||
return multiverse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prism連携クラスを返す
|
||||
* @return MultiverseCoreBridge
|
||||
*/
|
||||
public PrismBridge getPrism() {
|
||||
return prism;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通常チャット用のロガーを返す
|
||||
* @return normalChatLogger
|
||||
|
||||
@@ -36,6 +36,9 @@ public class LunaChatConfig {
|
||||
/** チャンネルチャットの発言内容を、HawkEyeに記録するかどうか */
|
||||
private boolean loggingChatToHawkEye;
|
||||
|
||||
/** チャンネルチャットの発言内容を、Prismに記録するかどうか */
|
||||
private boolean loggingChatToPrism;
|
||||
|
||||
/** チャンネルチャットの発言内容を、コンソールに表示するかどうか */
|
||||
private boolean displayChatOnConsole;
|
||||
|
||||
@@ -118,8 +121,7 @@ public class LunaChatConfig {
|
||||
/** Japanize変換のタイプ<br/>
|
||||
* none = 日本語変換をしない<br/>
|
||||
* kana = カナ変換のみする<br/>
|
||||
* googleime = カナ変換後、GoogleIMEで漢字変換する<br/>
|
||||
* socialime = カナ変換後、SocialIMEで漢字変換する */
|
||||
* googleime = カナ変換後、GoogleIMEで漢字変換する */
|
||||
private JapanizeType japanizeType;
|
||||
|
||||
/** Japanize変換の1行表示と2行表示の切り替え<br/>
|
||||
@@ -172,6 +174,7 @@ public class LunaChatConfig {
|
||||
noJoinAsGlobal = config.getBoolean("noJoinAsGlobal", true);
|
||||
loggingChat = config.getBoolean("loggingChat", true);
|
||||
loggingChatToHawkEye = config.getBoolean("loggingChatToHawkEye", true);
|
||||
loggingChatToPrism = config.getBoolean("loggingChatToPrism", true);
|
||||
displayChatOnConsole = config.getBoolean("displayChatOnConsole", true);
|
||||
globalMarker = config.getString("globalMarker", "!");
|
||||
zeroMemberRemove = config.getBoolean("zeroMemberRemove", false);
|
||||
@@ -297,6 +300,14 @@ public class LunaChatConfig {
|
||||
return loggingChatToHawkEye;
|
||||
}
|
||||
|
||||
/**
|
||||
* チャンネルチャットの発言内容を、Prismに記録するかどうか
|
||||
* @return loggingChatToPrism
|
||||
*/
|
||||
public boolean isLoggingChatToPrism() {
|
||||
return loggingChatToPrism;
|
||||
}
|
||||
|
||||
/**
|
||||
* チャンネルチャットの発言内容を、コンソールに表示するかどうか
|
||||
* @return displayChatOnConsoleを返す
|
||||
@@ -493,8 +504,7 @@ public class LunaChatConfig {
|
||||
* Japanize変換のタイプ<br/>
|
||||
* none = 日本語変換をしない<br/>
|
||||
* kana = カナ変換のみする<br/>
|
||||
* googleime = カナ変換後、GoogleIMEで漢字変換する<br/>
|
||||
* socialime = カナ変換後、SocialIMEで漢字変換する
|
||||
* googleime = カナ変換後、GoogleIMEで漢字変換する
|
||||
* @return japanizeTypeを返す
|
||||
*/
|
||||
public JapanizeType getJapanizeType() {
|
||||
|
||||
@@ -7,6 +7,7 @@ package com.github.ucchyocean.lc.bridge;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import com.github.ucchyocean.lc.LunaChat;
|
||||
import com.github.ucchyocean.lc.Utility;
|
||||
@@ -48,11 +49,15 @@ public class HawkEyeBridge {
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void writeLog(String player, Location location, String data) {
|
||||
DataEntry entry = new DataEntry(player, DataType.CHAT, location, data);
|
||||
if ( isV162orLater ) {
|
||||
HawkEyeAPI.addEntry(entry);
|
||||
} else {
|
||||
HawkEyeAPI.addEntry(LunaChat.getInstance(), entry);
|
||||
}
|
||||
final DataEntry entry = new DataEntry(player, DataType.CHAT, location, data);
|
||||
new BukkitRunnable() {
|
||||
public void run() {
|
||||
if ( isV162orLater ) {
|
||||
HawkEyeAPI.addEntry(entry);
|
||||
} else {
|
||||
HawkEyeAPI.addEntry(LunaChat.getInstance(), entry);
|
||||
}
|
||||
}
|
||||
}.runTaskAsynchronously(LunaChat.getInstance());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* @author ucchy
|
||||
* @license LGPLv3
|
||||
* @copyright Copyright ucchy 2016
|
||||
*/
|
||||
package com.github.ucchyocean.lc.bridge;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
import com.github.ucchyocean.lc.LunaChat;
|
||||
|
||||
import me.botsko.prism.Prism;
|
||||
import me.botsko.prism.actionlibs.ActionFactory;
|
||||
import me.botsko.prism.actionlibs.RecordingQueue;
|
||||
|
||||
/**
|
||||
* Prism連携クラス
|
||||
* @author ucchy
|
||||
*/
|
||||
public class PrismBridge {
|
||||
|
||||
/** コンストラクタは使用不可 */
|
||||
private PrismBridge() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Prism をロードする
|
||||
* @return ロードしたブリッジのインスタンス
|
||||
*/
|
||||
public static PrismBridge load() {
|
||||
return new PrismBridge();
|
||||
}
|
||||
|
||||
/**
|
||||
* PrismにCHATログを書き出す
|
||||
* @param player プレイヤー
|
||||
* @param data データ
|
||||
*/
|
||||
public void writeLog(final Player player, final String data) {
|
||||
if ( !Prism.getIgnore().event( "player-chat", player ) ) {
|
||||
return;
|
||||
}
|
||||
new BukkitRunnable() {
|
||||
public void run() {
|
||||
RecordingQueue.addToQueue( ActionFactory.createPlayer(
|
||||
"player-chat", player, data ) );
|
||||
}
|
||||
}.runTaskAsynchronously(LunaChat.getInstance());
|
||||
}
|
||||
}
|
||||
@@ -750,15 +750,26 @@ public class ChannelImpl extends Channel {
|
||||
* @param player プレイヤー
|
||||
*/
|
||||
private void log(String message, String name, ChannelPlayer player) {
|
||||
|
||||
// LunaChatのチャットログへ記録
|
||||
LunaChatConfig config = LunaChat.getInstance().getLunaChatConfig();
|
||||
if ( config.isLoggingChat() && logger != null ) {
|
||||
logger.log(message, name);
|
||||
}
|
||||
|
||||
// Hawkeye Reloaded のチャットログへ記録
|
||||
if ( config.isLoggingChatToHawkEye() && LunaChat.getInstance().getHawkEye() != null
|
||||
&& player != null && player.getLocation() != null ) {
|
||||
LunaChat.getInstance().getHawkEye().writeLog(name, player.getLocation(),
|
||||
"channel(" + getName() + ")-" + Utility.stripColor(message));
|
||||
}
|
||||
|
||||
// Prism のチャットログへ記録
|
||||
if ( config.isLoggingChatToPrism() && LunaChat.getInstance().getPrism() != null
|
||||
&& player != null && player.getPlayer() != null ) {
|
||||
LunaChat.getInstance().getPrism().writeLog(player.getPlayer(),
|
||||
"channel(" + getName() + ")-" + Utility.stripColor(message));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -104,8 +104,6 @@ public class DelayedJapanizeConvertTask extends BukkitRunnable {
|
||||
// IME変換
|
||||
if ( type == JapanizeType.GOOGLE_IME ) {
|
||||
japanized = IMEConverter.convByGoogleIME(japanized);
|
||||
} else if ( type == JapanizeType.SOCIAL_IME ) {
|
||||
japanized = IMEConverter.convBySocialIME(japanized);
|
||||
}
|
||||
|
||||
// キーワードのアンロック
|
||||
|
||||
@@ -39,7 +39,9 @@ public class IMEConverter {
|
||||
* SocialIMEを使って変換する
|
||||
* @param org 変換元
|
||||
* @return 変換後
|
||||
* @deprecated SocialIMEが2016年9月1日にサービス終了するため、このAPIは今後呼び出してはならない。
|
||||
*/
|
||||
@Deprecated
|
||||
public static String convBySocialIME(String org) {
|
||||
return conv(org, false);
|
||||
}
|
||||
|
||||
@@ -13,10 +13,7 @@ public enum JapanizeType {
|
||||
KANA("kana"),
|
||||
|
||||
/** カナ変換後、GoogleIMEで漢字変換 */
|
||||
GOOGLE_IME("googleime"),
|
||||
|
||||
/** カナ変換後、SocialIMEで漢字変換 */
|
||||
SOCIAL_IME("socialime");
|
||||
GOOGLE_IME("googleime");
|
||||
|
||||
private String id;
|
||||
|
||||
|
||||
@@ -29,6 +29,11 @@ loggingChat: true
|
||||
# この設定を利用する場合は、HawkEyeのconfig.ymlで、log: セクションの chat の設定を true にしてください。
|
||||
loggingChatToHawkEye: true
|
||||
|
||||
# チャンネルチャットの発言内容を、Prismに記録するかどうか
|
||||
# この設定を利用する場合は、Prismのconfig.ymlで、
|
||||
# tracking: セクションの player-chat の設定を true にしてください。
|
||||
loggingChatToPrism: true
|
||||
|
||||
# チャンネルチャットの発言内容を、サーバーコンソールに表示するかどうか
|
||||
displayChatOnConsole: true
|
||||
|
||||
@@ -177,11 +182,10 @@ enableNormalChatColorCode: true
|
||||
# -------------------- Japanize変換設定 --------------------
|
||||
|
||||
# ローマ字をかな文字や漢字に変換する設定。
|
||||
# none/kana/GoogleIME/SocialIME の4つのいずれかが設定可能。
|
||||
# none/kana/GoogleIME の3つのいずれかが設定可能。
|
||||
# none : 変換なし。
|
||||
# kana : かな変換のみ。
|
||||
# GoogleIME : かな変換したのち、GoogleIMEを使って漢字変換する。
|
||||
# SocialIME : かな変換したのち、SocialIMEを使って漢字変換する。
|
||||
japanizeType: GoogleIME
|
||||
|
||||
# かな変換や漢字変換時に、
|
||||
|
||||
@@ -3,7 +3,7 @@ main: com.github.ucchyocean.lc.LunaChat
|
||||
version: ${project.version}
|
||||
author: ucchy
|
||||
description: ${project.description}
|
||||
softdepend: [Vault, dynmap, HawkEye, Multiverse-Core, mcMMO]
|
||||
softdepend: [Vault, dynmap, HawkEye, Multiverse-Core, mcMMO, Prism]
|
||||
|
||||
commands:
|
||||
lunachat:
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする