LunaChat v2.2.0 : Fixed some bugs.
このコミットが含まれているのは:
1 親
23168b370c
コミット
0fedd6aaf1
6ファイル変更
+18
-4
検索条件に一致するファイルはありません
@@ -455,9 +455,8 @@ public class Channel implements ConfigurationSerializable {
|
||||
p.sendMessage(message);
|
||||
}
|
||||
// 受信者が自分以外いない場合は、メッセージを表示する
|
||||
if ( recipients.size() == 0 ||
|
||||
(recipients.size() == 1 &&
|
||||
recipients.get(0).getName().equals(player.getName()) ) ) {
|
||||
if ( isWorldRange && ( recipients.size() == 0 ||
|
||||
(recipients.size() == 1 && recipients.get(0).getName().equals(player.getName()) ) ) ) {
|
||||
String msg = replaceKeywords(MSG_NO_RECIPIENT, null);
|
||||
player.sendMessage(msg);
|
||||
}
|
||||
|
||||
@@ -355,6 +355,7 @@ public class ChannelManager implements LunaChatAPI {
|
||||
*/
|
||||
@Override
|
||||
public Channel getChannel(String channelName) {
|
||||
if ( channelName == null ) return null;
|
||||
return channels.get(channelName.toLowerCase());
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
import com.github.ucchyocean.lc.bridge.DynmapBridge;
|
||||
import com.github.ucchyocean.lc.bridge.VaultChatBridge;
|
||||
import com.github.ucchyocean.lc.command.LunaChatCommand;
|
||||
import com.github.ucchyocean.lc.command.LunaChatJapanizeCommand;
|
||||
import com.github.ucchyocean.lc.command.LunaChatMessageCommand;
|
||||
import com.github.ucchyocean.lc.command.LunaChatReplyCommand;
|
||||
|
||||
@@ -61,6 +62,7 @@ public class LunaChat extends JavaPlugin {
|
||||
getCommand("lunachat").setExecutor(new LunaChatCommand());
|
||||
getCommand("message").setExecutor(new LunaChatMessageCommand());
|
||||
getCommand("reply").setExecutor(new LunaChatReplyCommand());
|
||||
getCommand("lcjapanize").setExecutor(new LunaChatJapanizeCommand());
|
||||
|
||||
// シリアル化可能オブジェクトの登録
|
||||
ConfigurationSerialization.registerClass(Channel.class, "Channel");
|
||||
|
||||
@@ -40,6 +40,7 @@ public class LunaChatCommand implements CommandExecutor {
|
||||
commands.add(new KickCommand());
|
||||
commands.add(new BanCommand());
|
||||
commands.add(new PardonCommand());
|
||||
commands.add(new InfoCommand());
|
||||
commands.add(new CreateCommand());
|
||||
commands.add(new RemoveCommand());
|
||||
commands.add(new FormatCommand());
|
||||
|
||||
@@ -22,6 +22,8 @@ import com.github.ucchyocean.lc.Resources;
|
||||
public class LunaChatJapanizeCommand implements CommandExecutor {
|
||||
|
||||
private static final String PERM_JAPANIZE_OTHER = "lunachat.japanize-other";
|
||||
|
||||
private static final String PREINFO = Resources.get("infoPrefix");
|
||||
private static final String PREERR = Resources.get("errorPrefix");
|
||||
|
||||
/**
|
||||
@@ -47,6 +49,8 @@ public class LunaChatJapanizeCommand implements CommandExecutor {
|
||||
LunaChatAPI api = LunaChat.instance.getLunaChatAPI();
|
||||
api.setPlayersJapanize(player.getName(), value);
|
||||
|
||||
sendResourceMessage(sender, PREINFO,
|
||||
"cmdmsgPlayerJapanize", args[0]);
|
||||
return true;
|
||||
|
||||
} else if ( args.length == 2 &&
|
||||
@@ -69,10 +73,14 @@ public class LunaChatJapanizeCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
// Japanize設定をon/offにする
|
||||
boolean value = args[0].equalsIgnoreCase("on");
|
||||
boolean value = args[1].equalsIgnoreCase("on");
|
||||
LunaChatAPI api = LunaChat.instance.getLunaChatAPI();
|
||||
api.setPlayersJapanize(target.getName(), value);
|
||||
|
||||
sendResourceMessage(target, PREINFO,
|
||||
"cmdmsgPlayerJapanize", args[1]);
|
||||
sendResourceMessage(sender, PREINFO,
|
||||
"cmdmsgPlayerJapanizeOther", args[0], args[1]);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする