fix: 修复命令未return的问题

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-08-05 10:14:37 +08:00
parent 60c08f0aca
commit 4a4cb932d7

View File

@ -96,6 +96,7 @@ public class YumCommand implements Listener, CommandExecutor {
final List<Files> lf = Files.parseList(IOUtil.getData(String.format(BukkitDev.PLUGIN, id))); final List<Files> lf = Files.parseList(IOUtil.getData(String.format(BukkitDev.PLUGIN, id)));
if (lf.isEmpty()) { if (lf.isEmpty()) {
sender.sendMessage(String.format(not_found_id_from_bukkit, id)); sender.sendMessage(String.format(not_found_id_from_bukkit, id));
return;
} }
sender.sendMessage(filelistprefix); sender.sendMessage(filelistprefix);
for (int i = 0; i < lf.size() || i < 8; i++) { for (int i = 0; i < lf.size() || i < 8; i++) {
@ -136,6 +137,7 @@ public class YumCommand implements Listener, CommandExecutor {
final List<Files> lf = Files.parseList(IOUtil.getData(String.format(BukkitDev.PLUGIN, id))); final List<Files> lf = Files.parseList(IOUtil.getData(String.format(BukkitDev.PLUGIN, id)));
if (lf.isEmpty()) { if (lf.isEmpty()) {
sender.sendMessage(String.format(not_found_id_from_bukkit, id)); sender.sendMessage(String.format(not_found_id_from_bukkit, id));
return;
} }
final Files f = lf.get(0); final Files f = lf.get(0);
final String url = f.downloadUrl; final String url = f.downloadUrl;