1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-12-27 07:28:52 +00:00

feat: 子命令通过返回true

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-09-14 01:53:52 +08:00
parent 94c50995f2
commit 64b0b9992a
2 changed files with 10 additions and 11 deletions

View File

@ -125,9 +125,8 @@ public class CommandInfo {
} else {
runnable.run();
}
return true;
}
return false;
return true;
}
/**

View File

@ -34,35 +34,35 @@ public class CommandManager implements TabExecutor {
/**
* 插件实例类
*/
JavaPlugin plugin = P.instance;
private final JavaPlugin plugin = P.instance;
/**
* 默认命令
*/
CommandInfo defCmd = null;
private CommandInfo defCmd = null;
/**
* 命令列表
*/
Set<CommandInfo> cmds = new HashSet<>();
private final Set<CommandInfo> cmds = new HashSet<>();
/**
* Tab列表
*/
Set<TabInfo> tabs = new HashSet<>();
private final Set<TabInfo> tabs = new HashSet<>();
/**
* 命令缓存列表
*/
Map<String, CommandInfo> cmdCache = new HashMap<>();
private final Map<String, CommandInfo> cmdCache = new HashMap<>();
/**
* 命令名称缓存
*/
List<String> cmdNameCache = new ArrayList<>();
private final List<String> cmdNameCache = new ArrayList<>();
/**
* 命令帮助
*/
CommandHelp help;
private CommandHelp help;
/**
* 插件命令
*/
PluginCommand cmd;
private final PluginCommand cmd;
/**
* 命令管理器
@ -149,7 +149,7 @@ public class CommandManager implements TabExecutor {
/**
* 设置帮助解析器
*
*
* @param helpParse
* 帮助解析器
*/