mirror of
https://e.coding.net/circlecloud/YumCore.git
synced 2024-11-24 02:08:48 +00:00
release: update to 1.9.1
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
1e115b3cab
commit
f130cfed60
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pw.yumc</groupId>
|
||||
<artifactId>YumCore</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<version>1.9.1</version>
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
|
@ -1,17 +1,9 @@
|
||||
package pw.yumc.YumCore.commands;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
|
||||
import pw.yumc.YumCore.bukkit.Log;
|
||||
import pw.yumc.YumCore.bukkit.P;
|
||||
import pw.yumc.YumCore.commands.annotation.Help;
|
||||
@ -19,6 +11,9 @@ import pw.yumc.YumCore.commands.info.CommandInfo;
|
||||
import pw.yumc.YumCore.commands.interfaces.Executor;
|
||||
import pw.yumc.YumCore.commands.interfaces.HelpGenerator;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 主类命令管理
|
||||
*
|
||||
@ -47,8 +42,7 @@ public class CommandMain implements CommandExecutor {
|
||||
/**
|
||||
* 主类命令管理类
|
||||
*
|
||||
* @param clazzs
|
||||
* 命令类
|
||||
* @param clazzs 命令类
|
||||
*/
|
||||
public CommandMain(Executor... clazzs) {
|
||||
register(clazzs);
|
||||
@ -57,8 +51,7 @@ public class CommandMain implements CommandExecutor {
|
||||
/**
|
||||
* 注册命令
|
||||
*
|
||||
* @param clazzs
|
||||
* 命令类
|
||||
* @param clazzs 命令类
|
||||
* @return {@link CommandMain}
|
||||
*/
|
||||
public void register(Executor... clazzs) {
|
||||
@ -76,6 +69,8 @@ public class CommandMain implements CommandExecutor {
|
||||
CommandInfo ci = CommandInfo.parse(method, clazz);
|
||||
if (ci != null) {
|
||||
injectPluginCommand(ci);
|
||||
// 主命令注册统一设置
|
||||
ci.setMain();
|
||||
Class[] params = method.getParameterTypes();
|
||||
Log.d("注册主命令 %s 参数类型: %s", ci.getName(), Log.getSimpleNames((Object[]) params));
|
||||
try {
|
||||
@ -100,8 +95,7 @@ public class CommandMain implements CommandExecutor {
|
||||
/**
|
||||
* 检查缓存并获得命令
|
||||
*
|
||||
* @param cmd
|
||||
* 子命令
|
||||
* @param cmd 子命令
|
||||
* @return 命令信息
|
||||
*/
|
||||
private CommandInfo getByCache(String cmd) {
|
||||
|
Loading…
Reference in New Issue
Block a user