diff --git a/src/main/java/com/github/ucchyocean/lc/command/AcceptCommand.java b/src/main/java/com/github/ucchyocean/lc/command/AcceptCommand.java index 2dba7c5..46c2f5a 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/AcceptCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/AcceptCommand.java @@ -40,6 +40,16 @@ public class AcceptCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.USER; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/BanCommand.java b/src/main/java/com/github/ucchyocean/lc/command/BanCommand.java index f4d53bd..efa277b 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/BanCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/BanCommand.java @@ -41,6 +41,16 @@ public class BanCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/CreateCommand.java b/src/main/java/com/github/ucchyocean/lc/command/CreateCommand.java index 7348d00..eb2c12e 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/CreateCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/CreateCommand.java @@ -39,6 +39,16 @@ public class CreateCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/DenyCommand.java b/src/main/java/com/github/ucchyocean/lc/command/DenyCommand.java index 62fa149..bfb5365 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/DenyCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/DenyCommand.java @@ -39,6 +39,16 @@ public class DenyCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.USER; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/FormatCommand.java b/src/main/java/com/github/ucchyocean/lc/command/FormatCommand.java index 8f88b5a..6879dd5 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/FormatCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/FormatCommand.java @@ -40,6 +40,16 @@ public class FormatCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/HelpCommand.java b/src/main/java/com/github/ucchyocean/lc/command/HelpCommand.java new file mode 100644 index 0000000..5725cad --- /dev/null +++ b/src/main/java/com/github/ucchyocean/lc/command/HelpCommand.java @@ -0,0 +1,157 @@ +/* + * @author ucchy + * @license LGPLv3 + * @copyright Copyright ucchy 2013 + */ +package com.github.ucchyocean.lc.command; + +import java.util.ArrayList; + +import org.bukkit.command.CommandSender; + +/** + * helpコマンドの実行クラス + * @author ucchy + */ +public class HelpCommand extends SubCommandAbst { + + private static final String COMMAND_NAME = "help"; + private static final String PERMISSION_NODE = "lunachat." + COMMAND_NAME; + private static final String USAGE_KEY = "usageHelp"; + + // 1ページに表示するコマンドヘルプの項目数 + private static final int PAGE_ITEM_NUM = 6; + + private ArrayList commands; + + /** + * コンストラクタ + * @param commands + */ + public HelpCommand(ArrayList commands) { + this.commands = commands; + } + + /** + * コマンドを取得します。 + * @return コマンド + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandName() + */ + @Override + public String getCommandName() { + return COMMAND_NAME; + } + + /** + * パーミッションノードを取得します。 + * @return パーミッションノード + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getPermissionNode() + */ + @Override + public String getPermissionNode() { + return PERMISSION_NODE; + } + + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.USER; + } + + /** + * 使用方法に関するメッセージをsenderに送信します。 + * @param sender コマンド実行者 + * @param label 実行ラベル + * @see com.github.ucchyocean.lc.command.SubCommandAbst#sendUsageMessage() + */ + @Override + public void sendUsageMessage( + CommandSender sender, String label) { + sendResourceMessage(sender, "", USAGE_KEY, label); + } + + /** + * コマンドを実行します。 + * @param sender コマンド実行者 + * @param label 実行ラベル + * @param args 実行時の引数 + * @return コマンドが実行されたかどうか + * @see com.github.ucchyocean.lc.command.SubCommandAbst#runCommand(java.lang.String[]) + */ + @Override + public boolean runCommand(CommandSender sender, String label, String[] args) { + + CommandType type = CommandType.USER; + int page = 1; + + if ( args.length >= 2 && + (args[1].equalsIgnoreCase("mod") + || args[1].equalsIgnoreCase("moderator") ) ) { + type = CommandType.MODERATOR; + } else if ( args.length >= 2 + && args[1].equalsIgnoreCase("admin") ) { + type = CommandType.ADMIN; + } + + if ( args.length >= 3 && args[2].matches("[1-9]") ) { + page = Integer.parseInt(args[2]); + } + + printUsage(sender, label, type, page); + + return true; + } + + /** + * コマンドの使い方を senderに送る + * @param sender + * @param label + * @param type コマンド種別 + * @param page ページ + */ + private void printUsage(CommandSender sender, String label, + CommandType type, int page) { + + String typeDesc; + switch (type) { + case USER: + typeDesc = "user"; + break; + case MODERATOR: + typeDesc = "moderator"; + break; + case ADMIN: + typeDesc = "admin"; + break; + default: + typeDesc = "user"; + } + + // 種別に該当するコマンドを取得 + ArrayList com = new ArrayList(); + for ( SubCommandAbst c : commands ) { + if ( c.getCommandType() == type + && sender.hasPermission(c.getPermissionNode()) ) { + com.add(c); + } + } + + int lastPage = ( (com.size() - 1) / PAGE_ITEM_NUM) + 1; + + // 表示処理 + sendResourceMessage(sender, "", "usageTop", typeDesc, page, lastPage); + for (int index=(page-1)*PAGE_ITEM_NUM; index= com.size() ) break; + com.get(index).sendUsageMessage(sender, label); + } + sendResourceMessage(sender, "", "usageFoot"); + if ( page < lastPage ) { + sendResourceMessage(sender, "", "usageNoticeNextPage", typeDesc, (page + 1)); + } + } + +} diff --git a/src/main/java/com/github/ucchyocean/lc/command/HideCommand.java b/src/main/java/com/github/ucchyocean/lc/command/HideCommand.java index cdafb55..c82eec2 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/HideCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/HideCommand.java @@ -40,6 +40,16 @@ public class HideCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.USER; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/InfoCommand.java b/src/main/java/com/github/ucchyocean/lc/command/InfoCommand.java index 30ae7c1..d0056ec 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/InfoCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/InfoCommand.java @@ -42,6 +42,16 @@ public class InfoCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.USER; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/InviteCommand.java b/src/main/java/com/github/ucchyocean/lc/command/InviteCommand.java index 165541e..8749233 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/InviteCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/InviteCommand.java @@ -41,6 +41,16 @@ public class InviteCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/JoinCommand.java b/src/main/java/com/github/ucchyocean/lc/command/JoinCommand.java index 514fd1c..8929466 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/JoinCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/JoinCommand.java @@ -40,6 +40,16 @@ public class JoinCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.USER; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/KickCommand.java b/src/main/java/com/github/ucchyocean/lc/command/KickCommand.java index 46b6840..0767306 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/KickCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/KickCommand.java @@ -41,6 +41,16 @@ public class KickCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/LeaveCommand.java b/src/main/java/com/github/ucchyocean/lc/command/LeaveCommand.java index ac54407..9d3dcaa 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LeaveCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/LeaveCommand.java @@ -40,6 +40,16 @@ public class LeaveCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.USER; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/ListCommand.java b/src/main/java/com/github/ucchyocean/lc/command/ListCommand.java index 304bda6..ae05028 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/ListCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/ListCommand.java @@ -49,6 +49,16 @@ public class ListCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.USER; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommand.java b/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommand.java index 149a2a9..973db19 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/LunaChatCommand.java @@ -24,6 +24,7 @@ public class LunaChatCommand implements CommandExecutor { private ArrayList commands; private JoinCommand joinCommand; + private HelpCommand helpCommand; /** * コンストラクタ @@ -54,6 +55,8 @@ public class LunaChatCommand implements CommandExecutor { commands.add(new OptionCommand()); commands.add(new TemplateCommand()); commands.add(new ReloadCommand()); + helpCommand = new HelpCommand(commands); + commands.add(helpCommand); } /** @@ -72,7 +75,7 @@ public class LunaChatCommand implements CommandExecutor { // 引数なしは、ヘルプを表示 if (args.length == 0) { - printUsage(sender, label); + helpCommand.runCommand(sender, label, args); return true; } @@ -102,20 +105,6 @@ public class LunaChatCommand implements CommandExecutor { return joinCommand.runCommand(sender, label, args); } - /** - * コマンドの使い方を senderに送る - * - * @param sender - * @param label - */ - private void printUsage(CommandSender sender, String label) { - for ( SubCommandAbst c : commands ) { - if ( sender.hasPermission(c.getPermissionNode()) ) { - c.sendUsageMessage(sender, label); - } - } - } - /** * メッセージリソースのメッセージを、カラーコード置き換えしつつ、senderに送信する * diff --git a/src/main/java/com/github/ucchyocean/lc/command/ModeratorCommand.java b/src/main/java/com/github/ucchyocean/lc/command/ModeratorCommand.java index 34982f1..7106f32 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/ModeratorCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/ModeratorCommand.java @@ -42,6 +42,16 @@ public class ModeratorCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/MuteCommand.java b/src/main/java/com/github/ucchyocean/lc/command/MuteCommand.java index 46da1c5..edea4f1 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/MuteCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/MuteCommand.java @@ -41,6 +41,16 @@ public class MuteCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/OptionCommand.java b/src/main/java/com/github/ucchyocean/lc/command/OptionCommand.java index 8f04351..6ae6651 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/OptionCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/OptionCommand.java @@ -49,6 +49,16 @@ public class OptionCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/PardonCommand.java b/src/main/java/com/github/ucchyocean/lc/command/PardonCommand.java index 579cb63..a57b869 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/PardonCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/PardonCommand.java @@ -41,6 +41,16 @@ public class PardonCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/ReloadCommand.java b/src/main/java/com/github/ucchyocean/lc/command/ReloadCommand.java index e69522e..058325a 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/ReloadCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/ReloadCommand.java @@ -37,6 +37,16 @@ public class ReloadCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.ADMIN; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/RemoveCommand.java b/src/main/java/com/github/ucchyocean/lc/command/RemoveCommand.java index 603523e..4ff6a83 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/RemoveCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/RemoveCommand.java @@ -40,6 +40,16 @@ public class RemoveCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/SubCommandAbst.java b/src/main/java/com/github/ucchyocean/lc/command/SubCommandAbst.java index 2b1dc98..d6d9f22 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/SubCommandAbst.java +++ b/src/main/java/com/github/ucchyocean/lc/command/SubCommandAbst.java @@ -18,6 +18,22 @@ import com.github.ucchyocean.lc.Resources; */ public abstract class SubCommandAbst { + /** + * コマンドの種別 + * @author ucchy + */ + protected enum CommandType { + + /** 一般ユーザー向けコマンド */ + USER, + + /** チャンネルモデレーター向けコマンド */ + MODERATOR, + + /** サーバー管理者向けコマンド */ + ADMIN + } + protected static final String PREINFO = Resources.get("infoPrefix"); protected static final String PREERR = Resources.get("errorPrefix"); @@ -59,6 +75,11 @@ public abstract class SubCommandAbst { */ public abstract String getPermissionNode(); + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + */ + public abstract CommandType getCommandType(); /** * 使用方法に関するメッセージをsenderに送信します。 diff --git a/src/main/java/com/github/ucchyocean/lc/command/TemplateCommand.java b/src/main/java/com/github/ucchyocean/lc/command/TemplateCommand.java index 8dfb7b6..c0b1ab8 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/TemplateCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/TemplateCommand.java @@ -37,6 +37,16 @@ public class TemplateCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.ADMIN; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/UnhideCommand.java b/src/main/java/com/github/ucchyocean/lc/command/UnhideCommand.java index 76a4c6c..055810f 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/UnhideCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/UnhideCommand.java @@ -40,6 +40,16 @@ public class UnhideCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.USER; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/java/com/github/ucchyocean/lc/command/UnmuteCommand.java b/src/main/java/com/github/ucchyocean/lc/command/UnmuteCommand.java index 579c0ee..86a1279 100644 --- a/src/main/java/com/github/ucchyocean/lc/command/UnmuteCommand.java +++ b/src/main/java/com/github/ucchyocean/lc/command/UnmuteCommand.java @@ -41,6 +41,16 @@ public class UnmuteCommand extends SubCommandAbst { return PERMISSION_NODE; } + /** + * コマンドの種別を取得します。 + * @return コマンド種別 + * @see com.github.ucchyocean.lc.command.SubCommandAbst#getCommandType() + */ + @Override + public CommandType getCommandType() { + return CommandType.MODERATOR; + } + /** * 使用方法に関するメッセージをsenderに送信します。 * @param sender コマンド実行者 diff --git a/src/main/resources/messages.yml b/src/main/resources/messages.yml index ad58cd1..407cc52 100644 --- a/src/main/resources/messages.yml +++ b/src/main/resources/messages.yml @@ -113,32 +113,37 @@ errmsgChannelChatDisabled: 'このサーバーでは、チャンネルチャッ ngwordPrefix: 'NGワード発言により、' -usageJoin: '&7/%s join (channel) - チャンネルに参加します。' -usageLeave: '&7/%s leave - 参加しているチャンネルから退出します。' -usageList: '&7/%s list - チャンネルのリストを表示します。' -usageInvite: '&7/%s invite (name) - 指定した人をチャンネルチャットに招待します。' -usageAccept: '&7/%s accept - 招待を受けてチャンネルチャットに入室します。' -usageDeny: '&7/%s deny - 招待を拒否します。' -usageKick: '&7/%s kick (name) - 指定した人をチャンネルチャットからキックします。' -usageBan: '&7/%s ban (name) - 指定した人をチャンネルチャットからBANします。' -usagePardon: '&7/%s pardon (name) - 指定した人のBANを解除します。' -usageMute: '&7/%s mute (name) - 指定した人のチャンネルでの発言権を剥奪します。' -usageUnmute: '&7/%s unmute (name) - 指定した人のチャンネルでの発言権剥奪を解除します。' -usageHide: '&7/%s hide [channel] - 指定したチャンネルの発言内容を非表示にします。指定を省略すると、現在自分が居るチャンネルが非表示になります。' -usageUnhide: '&7/%s unhide [channel] - 指定したチャンネルの発言内容を非表示から表示に戻します。' -usageInfo: '&7/%s info [channel] - チャンネルの情報を表示します。' +usageJoin: '&6/%s join (channel) &7- チャンネルに参加します。' +usageLeave: '&6/%s leave &7- 参加しているチャンネルから退出します。' +usageList: '&6/%s list &7- チャンネルのリストを表示します。' +usageInvite: '&6/%s invite (name) &7- 指定した人をチャンネルチャットに招待します。' +usageAccept: '&6/%s accept &7- 招待を受けてチャンネルチャットに入室します。' +usageDeny: '&6/%s deny &7- 招待を拒否します。' +usageKick: '&6/%s kick (name) &7- 指定した人をチャンネルチャットからキックします。' +usageBan: '&6/%s ban (name) &7- 指定した人をチャンネルチャットからBANします。' +usagePardon: '&6/%s pardon (name) &7- 指定した人のBANを解除します。' +usageMute: '&6/%s mute (name) &7- 指定した人のチャンネルでの発言権を剥奪します。' +usageUnmute: '&6/%s unmute (name) &7- 指定した人のチャンネルでの発言権剥奪を解除します。' +usageHide: '&6/%s hide [channel] &7- 指定したチャンネルの発言内容を非表示にします。' +usageUnhide: '&6/%s unhide [channel] &7- 指定したチャンネルの発言内容を非表示から表示に戻します。' +usageInfo: '&6/%s info [channel] &7- チャンネルの情報を表示します。' -usageCreate: '&7/%s create (channel) [description] - チャンネルを作成します。' -usageRemove: '&7/%s remove [channel] - チャンネルを削除します。' -usageFormat: '&7/%s format [channel] (format...) - チャンネルのメッセージフォーマットを設定します。' -usageModerator: '&7/%s moderator [channel] (player) - チャンネルのモデレーターを指定したプレイヤーに設定します。' -usageMod: '&7/%s mod [channel] (player) - チャンネルのモデレーターを指定したプレイヤーに設定します。' -usageOption: '&7/%s option [channel] (key=value...) - チャンネルのオプションを設定します。' -usageTemplate: '&7/%s template (number) (template...) - メッセージフォーマットのテンプレートを登録します。' -usageReload: '&7/%s reload - config.ymlの再読み込みをします。' +usageCreate: '&6/%s create (channel) [description] &7- チャンネルを作成します。' +usageRemove: '&6/%s remove [channel] &7- チャンネルを削除します。' +usageFormat: '&6/%s format [channel] (format...) &7- チャンネルのメッセージフォーマットを設定します。' +usageModerator: '&6/%s moderator [channel] (player) &7- チャンネルのモデレーターを指定したプレイヤーに設定します。' +usageMod: '&6/%s mod [channel] (player) &7- チャンネルのモデレーターを指定したプレイヤーに設定します。' +usageOption: '&6/%s option [channel] (key=value...) &7- チャンネルのオプションを設定します。' +usageTemplate: '&6/%s template (number) (template...) &7- メッセージフォーマットのテンプレートを登録します。' +usageReload: '&6/%s reload &7- config.ymlの再読み込みをします。' +usageHelp: '&6/%s help [user|mod|admin] [page] &7- ヘルプを表示します。' -usageMessage: '&7/%s (name) [message] - 指定した人との1:1チャットを開始します。' -usageReply: '&7/%s [message] - 受信した1:1チャットに返信します。' +usageMessage: '&6/%s (name) [message] &7- 指定した人との1:1チャットを開始します。' +usageReply: '&6/%s [message] &7- 受信した1:1チャットに返信します。' -usageJapanize: '&7/%s on|off - Turn on/off the Japanize conversion of your chat.' -usageJapanizeOther: '&7/%s (player) on|off - Turn on/off the Japanize conversion of other player''s chat.' +usageJapanize: '&6/%s on|off &7- Turn on/off the Japanize conversion of your chat.' +usageJapanizeOther: '&6/%s (player) on|off &7- Turn on/off the Japanize conversion of other player''s chat.' + +usageTop: '&e----- &6LunaChat %s command (&c%d&6/&c%d&6) &e-----' +usageFoot: '&e-----------------------------------------' +usageNoticeNextPage: '&6次のページを見るには、&c/ch help %s %d&6 と実行してください。' diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 9b1d35a..b55d367 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -30,6 +30,7 @@ commands: / option (key=value...) - チャンネルのオプションを設定します。 / template (number) (template...) - メッセージフォーマットのテンプレートを登録します。 / reload - config.ymlの再読み込みをします。 + / help [user|mod|admin] [page] - ヘルプを表示します。 message: description: 1:1チャット送信コマンド aliases: [msg, tell, m, t] @@ -114,6 +115,9 @@ permissions: lunachat.reply: description: replyコマンドの使用権限 default: true + lunachat.help: + description: helpコマンドの使用権限 + default: true lunachat.japanize: description: lunachatのjapanizeオンオフ設定コマンドの使用権限 default: true @@ -140,6 +144,7 @@ permissions: lunachat.option: true lunachat.message: true lunachat.reply: true + lunachat.help: true lunachat.japanize: true description: 一般ユーザー向けの全コマンドの使用権限 lunachat-admin.template: