1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-11-22 01:48:50 +00:00

feat: 更新类库版本

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2017-01-10 20:10:39 +08:00
parent 49c97fb2ba
commit f7212b3767
3 changed files with 24 additions and 12 deletions

12
pom.xml
View File

@ -57,6 +57,10 @@
<maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.target>1.7</maven.compiler.target>
</properties> </properties>
<repositories> <repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
<repository> <repository>
<id>yumc-repo</id> <id>yumc-repo</id>
<url>http://repo.yumc.pw/content/groups/public/</url> <url>http://repo.yumc.pw/content/groups/public/</url>
@ -73,7 +77,7 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.10.2-R0.1-SNAPSHOT</version> <version>1.11-R0.1-SNAPSHOT</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>gson</artifactId> <artifactId>gson</artifactId>
@ -88,12 +92,8 @@
<dependency> <dependency>
<groupId>net.md-5</groupId> <groupId>net.md-5</groupId>
<artifactId>bungeecord-api</artifactId> <artifactId>bungeecord-api</artifactId>
<version>1.10-SNAPSHOT</version> <version>1.11-SNAPSHOT</version>
<exclusions> <exclusions>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
<exclusion> <exclusion>
<artifactId>snakeyaml</artifactId> <artifactId>snakeyaml</artifactId>
<groupId>org.yaml</groupId> <groupId>org.yaml</groupId>

View File

@ -1,9 +1,17 @@
package pw.yumc.YumCore.commands; 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.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand; import org.bukkit.command.PluginCommand;
import pw.yumc.YumCore.bukkit.Log; import pw.yumc.YumCore.bukkit.Log;
import pw.yumc.YumCore.bukkit.P; import pw.yumc.YumCore.bukkit.P;
import pw.yumc.YumCore.commands.annotation.Help; 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.Executor;
import pw.yumc.YumCore.commands.interfaces.HelpGenerator; 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) { if (ci != null) {
injectPluginCommand(ci); injectPluginCommand(ci);
Class[] params = method.getParameterTypes(); Class[] params = method.getParameterTypes();
Log.d("命令 %s 参数类型: %s", ci.getName(), Arrays.toString(params)); Log.d("注册主命令 %s 参数类型: %s", ci.getName(), Arrays.toString(params));
try { try {
Class<? extends CommandSender> sender = params[0]; Class<? extends CommandSender> sender = params[0];
cmds.add(ci); cmds.add(ci);

View File

@ -1,7 +1,14 @@
package pw.yumc.YumCore.commands; package pw.yumc.YumCore.commands;
import java.lang.reflect.Method; 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.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@ -276,7 +283,7 @@ public class CommandSub implements TabExecutor {
CommandTabInfo ti = CommandTabInfo.parse(method, clazz); CommandTabInfo ti = CommandTabInfo.parse(method, clazz);
if (ti != null) { if (ti != null) {
if (method.getReturnType().equals(List.class)) { if (method.getReturnType().equals(List.class)) {
Log.d("注册命令补全: %s ", method.getName()); Log.d("注册命令补全: %s ", method.getName());
tabs.add(ti); tabs.add(ti);
return true; return true;
} }