mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-11-22 14:28:46 +00:00
run repo command async...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
0f3aa5f0de
commit
f1b5551cf2
6
pom.xml
6
pom.xml
@ -64,8 +64,8 @@
|
|||||||
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>citycraft-repo</id>
|
<id>sumcraft-repo</id>
|
||||||
<url>http://ci.citycraft.cn:8800/jenkins/plugin/repository/everything/</url>
|
<url>http://ci.sumcraft.net:8080/plugin/repository/everything/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>Plugin Metrics</id>
|
<id>Plugin Metrics</id>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<version>1.8.3-R0.1-SNAPSHOT</version>
|
<version>1.8.8-R0.1-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.citycraft</groupId>
|
<groupId>cn.citycraft</groupId>
|
||||||
|
@ -37,6 +37,9 @@ public class CommandRepo extends BaseCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
|
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
|
||||||
|
main.getServer().getScheduler().runTaskAsynchronously(main, new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
final String cmd = args[0];
|
final String cmd = args[0];
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case "add":
|
case "add":
|
||||||
@ -64,11 +67,17 @@ public class CommandRepo extends BaseCommand {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> onTabComplete(final CommandSender sender, final Command command, final String label, final String[] args) {
|
public List<String> onTabComplete(final CommandSender sender, final Command command, final String label, final String[] args) {
|
||||||
if (args[0].equalsIgnoreCase("repo")) {
|
if (args[0].equalsIgnoreCase("repo")) {
|
||||||
return StringUtil.copyPartialMatches(args[1], Arrays.asList(new String[] { "add", "list", "clean", "update" }), new ArrayList<String>());
|
return StringUtil.copyPartialMatches(args[1], Arrays.asList(new String[] { "add",
|
||||||
|
"list",
|
||||||
|
"clean",
|
||||||
|
"update" }),
|
||||||
|
new ArrayList<String>());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user