mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2025-09-02 04:46:55 +00:00
@ -5,11 +5,13 @@ package cn.citycraft.Yum.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandException;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.permissions.Permission;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
|
||||
@ -47,10 +49,22 @@ public class CommandInfo extends BaseCommand {
|
||||
sender.sendMessage("§6插件版本: §3" + desc.getVersion());
|
||||
sender.sendMessage("§6插件作者: §3" + StringUtils.join(desc.getAuthors(), " "));
|
||||
sender.sendMessage("§6插件描述: §3" + (desc.getDescription() == null ? "无" : desc.getDescription()));
|
||||
sender.sendMessage("§6插件依赖: §3" + (desc.getDepend().size() == 0 ? "无" : ""));
|
||||
sender.sendMessage("§6插件依赖: §3" + (desc.getDepend().isEmpty() ? "无" : ""));
|
||||
StringUtil.sendStringArray(sender, desc.getDepend(), "§6 - §a");
|
||||
sender.sendMessage("§6插件软依赖: §3" + (desc.getSoftDepend().size() == 0 ? "无" : ""));
|
||||
sender.sendMessage("§6插件软依赖: §3" + (desc.getSoftDepend().isEmpty() ? "无" : ""));
|
||||
StringUtil.sendStringArray(sender, desc.getSoftDepend(), "§6 - §a");
|
||||
final Map<String, Map<String, Object>> clist = desc.getCommands();
|
||||
if (clist != null) {
|
||||
sender.sendMessage("§6插件注册命令: §3" + (clist.isEmpty() ? "无" : ""));
|
||||
StringUtil.sendStringArray(sender, clist.keySet(), "§6 - §a");
|
||||
}
|
||||
final List<Permission> plist = desc.getPermissions();
|
||||
if (plist != null) {
|
||||
sender.sendMessage("§6插件注册权限: " + (plist.isEmpty() ? "无" : ""));
|
||||
for (final Permission perm : plist) {
|
||||
sender.sendMessage("§6 - §a" + perm.getName() + "§6 - §e" + (perm.getDescription().isEmpty() ? "无描述" : perm.getDescription()));
|
||||
}
|
||||
}
|
||||
sender.sendMessage("§6插件物理路径: §3" + YumAPI.getPlugman().getPluginFile(plugin).getAbsolutePath());
|
||||
} else {
|
||||
sender.sendMessage("§4错误: §c插件 " + pluginname + " 不存在或已卸载!");
|
||||
|
Reference in New Issue
Block a user