From f7212b37674d8a304c5ab0e84de88cc5d95e4111 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Tue, 10 Jan 2017 20:10:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=B1=BB=E5=BA=93?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- pom.xml | 12 ++++++------ .../java/pw/yumc/YumCore/commands/CommandMain.java | 13 +++++++++---- .../java/pw/yumc/YumCore/commands/CommandSub.java | 11 +++++++++-- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index afeb5da..acfc109 100644 --- a/pom.xml +++ b/pom.xml @@ -57,6 +57,10 @@ 1.7 + + spigot-repo + https://hub.spigotmc.org/nexus/content/groups/public/ + yumc-repo http://repo.yumc.pw/content/groups/public/ @@ -73,7 +77,7 @@ org.spigotmc spigot-api - 1.10.2-R0.1-SNAPSHOT + 1.11-R0.1-SNAPSHOT gson @@ -88,12 +92,8 @@ net.md-5 bungeecord-api - 1.10-SNAPSHOT + 1.11-SNAPSHOT - - guava - com.google.guava - snakeyaml org.yaml diff --git a/src/main/java/pw/yumc/YumCore/commands/CommandMain.java b/src/main/java/pw/yumc/YumCore/commands/CommandMain.java index cc4541b..846aec9 100644 --- a/src/main/java/pw/yumc/YumCore/commands/CommandMain.java +++ b/src/main/java/pw/yumc/YumCore/commands/CommandMain.java @@ -1,9 +1,17 @@ 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; @@ -13,9 +21,6 @@ import pw.yumc.YumCore.commands.interfaces.ErrorHanlder; import pw.yumc.YumCore.commands.interfaces.Executor; import pw.yumc.YumCore.commands.interfaces.HelpGenerator; -import java.lang.reflect.Method; -import java.util.*; - /** * 主类命令管理 * @@ -79,7 +84,7 @@ public class CommandMain implements CommandExecutor { if (ci != null) { injectPluginCommand(ci); Class[] params = method.getParameterTypes(); - Log.d("命令 %s 参数类型: %s", ci.getName(), Arrays.toString(params)); + Log.d("注册主命令 %s 参数类型: %s", ci.getName(), Arrays.toString(params)); try { Class sender = params[0]; cmds.add(ci); diff --git a/src/main/java/pw/yumc/YumCore/commands/CommandSub.java b/src/main/java/pw/yumc/YumCore/commands/CommandSub.java index 827cdc8..9c55bf4 100644 --- a/src/main/java/pw/yumc/YumCore/commands/CommandSub.java +++ b/src/main/java/pw/yumc/YumCore/commands/CommandSub.java @@ -1,7 +1,14 @@ package pw.yumc.YumCore.commands; import java.lang.reflect.Method; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -276,7 +283,7 @@ public class CommandSub implements TabExecutor { CommandTabInfo ti = CommandTabInfo.parse(method, clazz); if (ti != null) { if (method.getReturnType().equals(List.class)) { - Log.d("注册命令补全: %s ", method.getName()); + Log.d("注册子命令补全: %s ", method.getName()); tabs.add(ti); return true; }