コミットを比較
| 作成者 | SHA1 | 日付 | |
|---|---|---|---|
|
|
f00d978942 | ||
|
|
e719e9e3c8 | ||
|
|
d41b0de7e1 | ||
|
|
b96d9566d0 | ||
|
|
1e384e9043 | ||
|
|
7c28c02736 | ||
|
|
274415a763 | ||
|
|
5f5a8c219f | ||
|
|
d403b16eda | ||
|
|
945a27034e | ||
|
|
d7f735c5ea | ||
|
|
9e3c5ec312 | ||
|
|
0866722243 | ||
|
|
a58830f314 |
検索条件に一致するファイルはありません
@@ -7,3 +7,4 @@
|
||||
*.iml
|
||||
/.sts4-cache
|
||||
/LunaChat
|
||||
/pom.xml.versionsBackup
|
||||
@@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.github.ucchyocean</groupId>
|
||||
<artifactId>LunaChat</artifactId>
|
||||
<version>3.0.11</version>
|
||||
<version>3.0.16</version>
|
||||
<description>A powerfull chat channel plugin with IME (Kana-Kanji conversion) support</description>
|
||||
<url>https://github.com/ucchyocean/LunaChat</url>
|
||||
|
||||
@@ -101,18 +101,23 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.12.4</version>
|
||||
<configuration>
|
||||
<junitArtifactName>junit:junit</junitArtifactName>
|
||||
<encoding>UTF-8</encoding>
|
||||
<inputEncoding>UTF-8</inputEncoding>
|
||||
<outputEncoding>UTF-8</outputEncoding>
|
||||
<argLine>-Dfile.encoding=UTF-8</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.12.4</version>
|
||||
<configuration>
|
||||
<junitArtifactName>junit:junit</junitArtifactName>
|
||||
<encoding>UTF-8</encoding>
|
||||
<inputEncoding>UTF-8</inputEncoding>
|
||||
<outputEncoding>UTF-8</outputEncoding>
|
||||
<argLine>-Dfile.encoding=UTF-8</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>1.3.1</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
@@ -158,7 +163,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.2-R0.1-SNAPSHOT</version>
|
||||
<optional>true</optional>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
@@ -172,7 +177,7 @@
|
||||
<dependency>
|
||||
<groupId>net.md-5</groupId>
|
||||
<artifactId>bungeecord-chat</artifactId>
|
||||
<version>1.16-R0.1</version>
|
||||
<version>1.16-R0.3</version>
|
||||
<optional>true</optional>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
@@ -212,7 +217,7 @@
|
||||
<dependency>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>2.1.128</version>
|
||||
<version>2.1.146</version>
|
||||
<optional>true</optional>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
@@ -241,7 +246,7 @@
|
||||
<dependency>
|
||||
<groupId>net.alpenblock</groupId>
|
||||
<artifactId>BungeePerms</artifactId>
|
||||
<version>4.0-dev-106</version>
|
||||
<version>4.0-dev-114</version>
|
||||
<optional>true</optional>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
@@ -267,22 +272,22 @@
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.8.5</version>
|
||||
<version>2.8.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.9</version>
|
||||
<version>3.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>16.0.2</version>
|
||||
<version>20.1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<version>4.13</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -145,6 +145,9 @@ public class LunaChatConfig {
|
||||
/** ノンジャパナイズマーカー これが発言の頭に入っている場合は、一時的にjapanizeを実行しない */
|
||||
private String noneJapanizeMarker;
|
||||
|
||||
/** プレイヤーのJapanize変換を、デフォルトでオンにするかオフにするかを設定する。 */
|
||||
private boolean japanizePlayerDefault;
|
||||
|
||||
/** 通常チャットで、JapanizeDisplayLine=2のとき、Japanize変換したあと表示するまでのウェイト(tick)
|
||||
* 隠し設定。 */
|
||||
private int japanizeWait;
|
||||
@@ -264,6 +267,7 @@ public class LunaChatConfig {
|
||||
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);
|
||||
@@ -563,6 +567,14 @@ public class LunaChatConfig {
|
||||
return noneJapanizeMarker;
|
||||
}
|
||||
|
||||
/**
|
||||
* プレイヤーのJapanize変換を、デフォルトでオンにするかオフにするかを設定する。
|
||||
* @return japanizePlayerDefault
|
||||
*/
|
||||
public boolean isJapanizePlayerDefault() {
|
||||
return japanizePlayerDefault;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通常チャットで、JapanizeDisplayLine=2のとき、Japanize変換したあと表示するまでのウェイト(tick)
|
||||
* @return japanizeWaitを返す
|
||||
|
||||
@@ -40,7 +40,8 @@ public class BungeePermsBridge {
|
||||
* @return the full prefix; may be null
|
||||
*/
|
||||
public String userPrefix(String nameoruuid, String server, String world) {
|
||||
return BungeePermsAPI.userPrefix(nameoruuid, server, world);
|
||||
String prefix = BungeePermsAPI.userPrefix(nameoruuid, server, world);
|
||||
return (prefix != null) ? prefix : "";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,6 +52,7 @@ public class BungeePermsBridge {
|
||||
* @return the full suffix; may be null
|
||||
*/
|
||||
public String userSuffix(String nameoruuid, String server, String world) {
|
||||
return BungeePermsAPI.userSuffix(nameoruuid, server, world);
|
||||
String suffix = BungeePermsAPI.userSuffix(nameoruuid, server, world);
|
||||
return (suffix != null) ? suffix : "";
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,11 @@ public class MultiverseCoreBridge {
|
||||
|
||||
MultiverseWorld mvworld = mvc.getMVWorldManager().getMVWorld(worldName);
|
||||
if ( mvworld != null ) {
|
||||
return mvworld.getColoredWorldString();
|
||||
if ( mvworld.getAlias().length() > 0 ) {
|
||||
return mvworld.getAlias();
|
||||
} else {
|
||||
return mvworld.getName();
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@@ -65,7 +69,11 @@ public class MultiverseCoreBridge {
|
||||
|
||||
MultiverseWorld mvworld = mvc.getMVWorldManager().getMVWorld(world);
|
||||
if ( mvworld != null ) {
|
||||
return mvworld.getColoredWorldString();
|
||||
if ( mvworld.getAlias().length() > 0 ) {
|
||||
return mvworld.getAlias();
|
||||
} else {
|
||||
return mvworld.getName();
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,8 @@ public class VaultChatBridge {
|
||||
* @return プレイヤーのprefix
|
||||
*/
|
||||
public String getPlayerPrefix(Player player) {
|
||||
return chatPlugin.getPlayerPrefix(player);
|
||||
String prefix = chatPlugin.getPlayerPrefix(player);
|
||||
return (prefix != null) ? prefix : "";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,6 +59,7 @@ public class VaultChatBridge {
|
||||
* @return プレイヤーのsuffix
|
||||
*/
|
||||
public String getPlayerSuffix(Player player) {
|
||||
return chatPlugin.getPlayerSuffix(player);
|
||||
String suffix = chatPlugin.getPlayerSuffix(player);
|
||||
return (suffix != null) ? suffix : "";
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,8 @@ public class BukkitEventListener implements Listener {
|
||||
}
|
||||
|
||||
for ( Channel channel : deleteList ) {
|
||||
LunaChat.getAPI().removeChannel(channel.getName());
|
||||
LunaChat.getAPI().removeChannel(
|
||||
channel.getName(), ChannelMember.getChannelMember(player));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,7 +287,7 @@ public class BukkitEventListener implements Listener {
|
||||
// グローバルチャンネルの取得、無ければ作成
|
||||
Channel global = api.getChannel(config.getGlobalChannel());
|
||||
if ( global == null ) {
|
||||
global = api.createChannel(config.getGlobalChannel());
|
||||
global = api.createChannel(config.getGlobalChannel(), player);
|
||||
}
|
||||
|
||||
String message = event.getMessage();
|
||||
@@ -450,7 +451,7 @@ public class BukkitEventListener implements Listener {
|
||||
// チャンネルが存在しない場合は作成する
|
||||
Channel global = api.getChannel(gcName);
|
||||
if ( global == null ) {
|
||||
global = api.createChannel(gcName);
|
||||
global = api.createChannel(gcName, ChannelMember.getChannelMember(player));
|
||||
}
|
||||
|
||||
// デフォルト発言先が無いなら、グローバルチャンネルに設定する
|
||||
@@ -478,7 +479,7 @@ public class BukkitEventListener implements Listener {
|
||||
// チャンネルが存在しない場合は作成する
|
||||
Channel channel = api.getChannel(cname);
|
||||
if ( channel == null ) {
|
||||
channel = api.createChannel(cname);
|
||||
channel = api.createChannel(cname, ChannelMember.getChannelMember(player));
|
||||
}
|
||||
|
||||
// チャンネルのメンバーでないなら、参加する
|
||||
|
||||
@@ -70,6 +70,7 @@ public class BungeeEventListener implements Listener {
|
||||
*/
|
||||
@EventHandler(priority=EventPriority.LOWEST)
|
||||
public void onAsyncPlayerChatLowest(ChatEvent event) {
|
||||
if ( event.isCancelled() ) return;
|
||||
if ( matchesEventPriority(EventPriority.LOWEST) ) {
|
||||
processChatEvent(event);
|
||||
}
|
||||
@@ -81,6 +82,7 @@ public class BungeeEventListener implements Listener {
|
||||
*/
|
||||
@EventHandler(priority=EventPriority.LOW)
|
||||
public void onAsyncPlayerChatLow(ChatEvent event) {
|
||||
if ( event.isCancelled() ) return;
|
||||
if ( matchesEventPriority(EventPriority.LOW) ) {
|
||||
processChatEvent(event);
|
||||
}
|
||||
@@ -92,6 +94,7 @@ public class BungeeEventListener implements Listener {
|
||||
*/
|
||||
@EventHandler(priority=EventPriority.NORMAL)
|
||||
public void onAsyncPlayerChatNormal(ChatEvent event) {
|
||||
if ( event.isCancelled() ) return;
|
||||
if ( matchesEventPriority(EventPriority.NORMAL) ) {
|
||||
processChatEvent(event);
|
||||
}
|
||||
@@ -103,6 +106,7 @@ public class BungeeEventListener implements Listener {
|
||||
*/
|
||||
@EventHandler(priority=EventPriority.HIGH)
|
||||
public void onAsyncPlayerChatHigh(ChatEvent event) {
|
||||
if ( event.isCancelled() ) return;
|
||||
if ( matchesEventPriority(EventPriority.HIGH) ) {
|
||||
processChatEvent(event);
|
||||
}
|
||||
@@ -114,6 +118,7 @@ public class BungeeEventListener implements Listener {
|
||||
*/
|
||||
@EventHandler(priority=EventPriority.HIGHEST)
|
||||
public void onAsyncPlayerChatHighest(ChatEvent event) {
|
||||
if ( event.isCancelled() ) return;
|
||||
if ( matchesEventPriority(EventPriority.HIGHEST) ) {
|
||||
processChatEvent(event);
|
||||
}
|
||||
@@ -179,7 +184,8 @@ public class BungeeEventListener implements Listener {
|
||||
}
|
||||
|
||||
for ( Channel channel : deleteList ) {
|
||||
LunaChat.getAPI().removeChannel(channel.getName());
|
||||
LunaChat.getAPI().removeChannel(
|
||||
channel.getName(), ChannelMember.getChannelMember(player));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,8 +247,12 @@ public class BungeeEventListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
// 発言内容を処理する
|
||||
processChat(ChannelMember.getChannelMember(event.getSender()), event.getMessage());
|
||||
// 発言内容を非同期で処理する
|
||||
ProxyServer.getInstance().getScheduler().runAsync(LunaChatBungee.getInstance(), new Runnable() {
|
||||
public void run() {
|
||||
processChat(ChannelMember.getChannelMember(event.getSender()), event.getMessage());
|
||||
}
|
||||
});
|
||||
|
||||
// イベントをキャンセル
|
||||
event.setCancelled(true);
|
||||
@@ -319,7 +329,7 @@ public class BungeeEventListener implements Listener {
|
||||
// グローバルチャンネルの取得、無ければ作成
|
||||
Channel global = api.getChannel(config.getGlobalChannel());
|
||||
if ( global == null ) {
|
||||
global = api.createChannel(config.getGlobalChannel());
|
||||
global = api.createChannel(config.getGlobalChannel(), member);
|
||||
}
|
||||
|
||||
// デフォルト発言先が無いなら、グローバルチャンネルに設定する
|
||||
@@ -468,7 +478,7 @@ public class BungeeEventListener implements Listener {
|
||||
// チャンネルが存在しない場合は作成する
|
||||
Channel channel = api.getChannel(cname);
|
||||
if ( channel == null ) {
|
||||
channel = api.createChannel(cname);
|
||||
channel = api.createChannel(cname, ChannelMember.getChannelMember(player));
|
||||
}
|
||||
|
||||
// チャンネルのメンバーでないなら、参加する
|
||||
@@ -500,7 +510,7 @@ public class BungeeEventListener implements Listener {
|
||||
// チャンネルが存在しない場合は作成する
|
||||
Channel global = api.getChannel(gcName);
|
||||
if ( global == null ) {
|
||||
global = api.createChannel(gcName);
|
||||
global = api.createChannel(gcName, ChannelMember.getChannelMember(player));
|
||||
}
|
||||
|
||||
// デフォルト発言先が無いなら、グローバルチャンネルに設定する
|
||||
|
||||
@@ -65,57 +65,12 @@ public class BukkitChannel extends Channel {
|
||||
if ( isBroadcastChannel() ) {
|
||||
// ブロードキャストチャンネル
|
||||
|
||||
if ( isWorldRange() && player.isOnline() && player.getWorldName() != null ) {
|
||||
|
||||
World w = Bukkit.getWorld(player.getWorldName());
|
||||
|
||||
if ( getChatRange() > 0 ) {
|
||||
// 範囲チャット
|
||||
|
||||
if ( player instanceof ChannelMemberBukkit ) {
|
||||
// ↑常にtrueだと思うが、念のため。
|
||||
|
||||
Location origin = ((ChannelMemberBukkit)player).getLocation();
|
||||
for ( Player p : Bukkit.getOnlinePlayers() ) {
|
||||
ChannelMember cp = ChannelMember.getChannelMember(p);
|
||||
if ( p.getWorld().equals(w) &&
|
||||
origin.distance(p.getLocation()) <= getChatRange() &&
|
||||
!getHided().contains(cp) ) {
|
||||
recipients.add(ChannelMember.getChannelMember(p));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// ワールドチャット
|
||||
|
||||
for ( Player p : Bukkit.getOnlinePlayers() ) {
|
||||
ChannelMember cp = ChannelMember.getChannelMember(p);
|
||||
if ( p.getWorld().equals(w) && !getHided().contains(cp) ) {
|
||||
recipients.add(ChannelMember.getChannelMember(p));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 受信者が自分以外いない場合は、メッセージを表示する
|
||||
if ( Messages.noRecipientMessage("", "").length > 0 && (
|
||||
recipients.size() == 0 ||
|
||||
(recipients.size() == 1 &&
|
||||
recipients.get(0).getName().equals(player.getName()) ) ) ) {
|
||||
sendNoRecipientMessage = true;
|
||||
}
|
||||
|
||||
} else {
|
||||
// 通常ブロードキャスト(全員へ送信)
|
||||
|
||||
for ( Player p : Bukkit.getOnlinePlayers() ) {
|
||||
ChannelMember cp = ChannelMember.getChannelMember(p);
|
||||
if ( !getHided().contains(cp) ) {
|
||||
recipients.add(cp);
|
||||
}
|
||||
for ( Player p : Bukkit.getOnlinePlayers() ) {
|
||||
ChannelMember cp = ChannelMember.getChannelMember(p);
|
||||
if ( !getHided().contains(cp) ) {
|
||||
recipients.add(cp);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// 通常チャンネル
|
||||
|
||||
@@ -126,6 +81,47 @@ public class BukkitChannel extends Channel {
|
||||
}
|
||||
}
|
||||
|
||||
if ( isWorldRange() && player.isOnline() && player.getWorldName() != null ) {
|
||||
// ワールドチャットや範囲チャットの場合は、範囲外のプレイヤーをrecipientsから抜く
|
||||
|
||||
List<ChannelMember> recipientsNew = new ArrayList<>();
|
||||
|
||||
if ( getChatRange() > 0 ) {
|
||||
// 範囲チャット
|
||||
|
||||
@Nullable Location origin = ((ChannelMemberBukkit)player).getLocation();
|
||||
for ( ChannelMember recipient : recipients ) {
|
||||
@Nullable Location target = ((ChannelMemberBukkit)recipient).getLocation();
|
||||
if ( origin != null && target != null &&
|
||||
origin.getWorld().equals(target.getWorld()) &&
|
||||
origin.distance(target) <= getChatRange() ) {
|
||||
recipientsNew.add(recipient);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// ワールドチャット
|
||||
|
||||
@Nullable World w = ((ChannelMemberBukkit)player).getWorld();
|
||||
for ( ChannelMember recipient : recipients ) {
|
||||
@Nullable World target = ((ChannelMemberBukkit)recipient).getWorld();
|
||||
if ( w != null && target != null && w.equals(target) ) {
|
||||
recipientsNew.add(recipient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
recipients = recipientsNew;
|
||||
|
||||
// 受信者が自分以外いない場合は、メッセージを表示する
|
||||
if ( Messages.noRecipientMessage("", "").length > 0 && (
|
||||
recipients.size() == 0 ||
|
||||
(recipients.size() == 1 &&
|
||||
recipients.get(0).getName().equals(player.getName()) ) ) ) {
|
||||
sendNoRecipientMessage = true;
|
||||
}
|
||||
}
|
||||
|
||||
// opListenAllChannel 設定がある場合は、
|
||||
// パーミッション lunachat-admin.listen-all-channels を持つプレイヤーを
|
||||
// 受信者に加える。
|
||||
|
||||
@@ -272,6 +272,8 @@ public abstract class Channel {
|
||||
// チャンネルで許可されていて、発言者がパーミッションを持っている場合に置き換える
|
||||
if ( isAllowCC() && player.hasPermission("lunachat.allowcc") ) {
|
||||
maskedMessage = Utility.replaceColorCode(maskedMessage);
|
||||
} else {
|
||||
maskedMessage = Utility.stripColorCode(maskedMessage);
|
||||
}
|
||||
|
||||
// LunaChatChannelChatEvent イベントコール
|
||||
|
||||
@@ -261,7 +261,7 @@ public class ChannelManager implements LunaChatAPI {
|
||||
@Override
|
||||
public boolean isPlayerJapanize(String playerName) {
|
||||
if ( !japanize.containsKey(playerName) ) {
|
||||
return true;
|
||||
return LunaChat.getConfig().isJapanizePlayerDefault();
|
||||
}
|
||||
return japanize.get(playerName);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class CreateCommand extends LunaChatSubCommand {
|
||||
}
|
||||
|
||||
// チャンネル作成
|
||||
Channel channel = api.createChannel(name);
|
||||
Channel channel = api.createChannel(name, sender);
|
||||
if ( channel != null ) {
|
||||
channel.setDescription(desc);
|
||||
channel.save();
|
||||
|
||||
@@ -141,7 +141,7 @@ public class JoinCommand extends LunaChatSubCommand {
|
||||
}
|
||||
|
||||
// チャンネル作成
|
||||
Channel c = api.createChannel(channelName);
|
||||
Channel c = api.createChannel(channelName, sender);
|
||||
if ( c != null ) {
|
||||
c.addMember(sender);
|
||||
sender.sendMessage(Messages.cmdmsgCreate(channelName));
|
||||
|
||||
@@ -83,7 +83,7 @@ public class ListCommand extends LunaChatSubCommand {
|
||||
ChannelMember sender, String label, String[] args) {
|
||||
|
||||
int page = 1;
|
||||
if ( args.length >= 2 && args[1].matches("[0-9]") ) {
|
||||
if ( args.length >= 2 && args[1].matches("[0-9]+") ) {
|
||||
page = Integer.parseInt(args[1]);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
*/
|
||||
package com.github.ucchyocean.lc3.command;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.github.ucchyocean.lc3.LunaChat;
|
||||
import com.github.ucchyocean.lc3.LunaChatAPI;
|
||||
import com.github.ucchyocean.lc3.Messages;
|
||||
import com.github.ucchyocean.lc3.channel.Channel;
|
||||
import com.github.ucchyocean.lc3.member.ChannelMember;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 1:1チャット送信コマンド
|
||||
* @author ucchy
|
||||
@@ -86,7 +86,7 @@ public class LunaChatMessageCommand {
|
||||
Channel channel = api.getChannel(cname);
|
||||
if ( channel == null ) {
|
||||
// チャンネルを作成して、送信者、受信者をメンバーにする
|
||||
channel = api.createChannel(cname);
|
||||
channel = api.createChannel(cname, inviter);
|
||||
channel.setVisible(false);
|
||||
channel.addMember(inviter);
|
||||
channel.addMember(invited);
|
||||
|
||||
@@ -107,7 +107,7 @@ public class RemoveCommand extends LunaChatSubCommand {
|
||||
}
|
||||
|
||||
// チャンネル削除
|
||||
if ( api.removeChannel(cname) ) {
|
||||
if ( api.removeChannel(cname, sender) ) {
|
||||
sender.sendMessage(Messages.cmdmsgRemove(cname));
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -203,10 +203,15 @@ public class ClickableFormat {
|
||||
String text = matcher.group(2);
|
||||
String hover = matcher.group(3);
|
||||
String command = matcher.group(4);
|
||||
TextComponent tc = new TextComponent(text);
|
||||
TextComponent tc = new TextComponent(TextComponent.fromLegacyText(text));
|
||||
if ( !hover.isEmpty() ) {
|
||||
tc.setHoverEvent(new HoverEvent(
|
||||
HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(hover).create()));
|
||||
@SuppressWarnings("deprecation")
|
||||
HoverEvent event = new HoverEvent(
|
||||
HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(hover).create());
|
||||
// bungeecord-chat v1.16-R0.3 style.
|
||||
// HoverEvent event = new HoverEvent(
|
||||
// HoverEvent.Action.SHOW_TEXT, new Text(hover));
|
||||
tc.setHoverEvent(event);
|
||||
}
|
||||
if ( type.equals("RUN_COMMAND") ) {
|
||||
tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, command));
|
||||
|
||||
@@ -112,7 +112,7 @@ public class Utility {
|
||||
}
|
||||
|
||||
/**
|
||||
* 文字列に含まれているカラーコード(§a)を除去して返す
|
||||
* 文字列に含まれているカラーコード(§a)やカラーコード候補(&aや#99AABB)を除去して返す
|
||||
* @param source 置き換え元の文字列
|
||||
* @return 置き換え後の文字列
|
||||
*/
|
||||
|
||||
@@ -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 --------------------
|
||||
|
||||
@@ -225,6 +225,8 @@ japanizeIgnorePlayerName: true
|
||||
# これが発言の頭に入っている場合は、一時的にJapanize変換を実行しない。
|
||||
noneJapanizeMarker: '$'
|
||||
|
||||
# プレイヤーのJapanize変換を、デフォルトでオンにするかオフにするかを設定する。
|
||||
japanizePlayerDefault: true
|
||||
|
||||
|
||||
# -------------------- BungeeCord設定 --------------------
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする