mirror of
				https://e.coding.net/circlecloud/Yum.git
				synced 2025-11-04 05:06:02 +00:00 
			
		
		
		
	
							
								
								
									
										20
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								pom.xml
									
									
									
									
									
								
							@@ -3,11 +3,10 @@
 | 
			
		||||
    <modelVersion>4.0.0</modelVersion>
 | 
			
		||||
    <groupId>pw.yumc</groupId>
 | 
			
		||||
    <artifactId>Yum</artifactId>
 | 
			
		||||
    <version>2.7.8</version>
 | 
			
		||||
    <name>Yum</name>
 | 
			
		||||
    <version>2.7.9</version>
 | 
			
		||||
    <description>Minecraft 服务器插件管理系统</description>
 | 
			
		||||
    <build>
 | 
			
		||||
        <finalName>${project.name}</finalName>
 | 
			
		||||
        <finalName>${project.artifactId}</finalName>
 | 
			
		||||
        <resources>
 | 
			
		||||
            <resource>
 | 
			
		||||
                <directory>src/main/resources</directory>
 | 
			
		||||
@@ -43,14 +42,6 @@
 | 
			
		||||
                    </execution>
 | 
			
		||||
                </executions>
 | 
			
		||||
            </plugin>
 | 
			
		||||
            <plugin>
 | 
			
		||||
                <groupId>org.apache.maven.plugins</groupId>
 | 
			
		||||
                <artifactId>maven-compiler-plugin</artifactId>
 | 
			
		||||
                <configuration>
 | 
			
		||||
                    <source>1.7</source>
 | 
			
		||||
                    <target>1.7</target>
 | 
			
		||||
                </configuration>
 | 
			
		||||
            </plugin>
 | 
			
		||||
        </plugins>
 | 
			
		||||
    </build>
 | 
			
		||||
    <ciManagement>
 | 
			
		||||
@@ -60,8 +51,9 @@
 | 
			
		||||
    <properties>
 | 
			
		||||
        <update.description>§a补丁包 2.7.9 版本</update.description>
 | 
			
		||||
        <update.changes>
 | 
			
		||||
            §6- §cfix: §7修复仓库数据读取错误的问题;
 | 
			
		||||
            §6- §cfix: §7修复一个tab补全产生的错误;
 | 
			
		||||
            §6- §btip: §a本插件最后一次更新 2.7.8 版本
 | 
			
		||||
            §6- §btip: §a本插件最后一次更新 2.7.8 版本;
 | 
			
		||||
            §6- §afeat: §7线程中断只显示一次调试信息;
 | 
			
		||||
            §6- §afeat: §7更新线程检查 添加调试;
 | 
			
		||||
            §6- §afeat: §7修改显示前缀;
 | 
			
		||||
@@ -74,7 +66,7 @@
 | 
			
		||||
            §6- §cfix: §7修复lasterror命令显示问题;
 | 
			
		||||
            §6- §afeat: §7使用SimpleJson解析仓库数据;
 | 
			
		||||
            §6- §afeat: §7使用新的类库处理Tellraw;
 | 
			
		||||
            §6- §cfix: §7当仓库未找到插件时没有提示的BUG;
 | 
			
		||||
            §6- §cfix: §7当仓库未找到插件时没有提示的BUG
 | 
			
		||||
        </update.changes>
 | 
			
		||||
        <env.GIT_COMMIT>DEV</env.GIT_COMMIT>
 | 
			
		||||
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 | 
			
		||||
@@ -99,7 +91,7 @@
 | 
			
		||||
            <groupId>pw.yumc</groupId>
 | 
			
		||||
            <artifactId>YumCore</artifactId>
 | 
			
		||||
            <type>jar</type>
 | 
			
		||||
            <version>1.5</version>
 | 
			
		||||
            <version>1.6</version>
 | 
			
		||||
        </dependency>
 | 
			
		||||
        <dependency>
 | 
			
		||||
            <groupId>pw.yumc</groupId>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,3 @@
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
package pw.yumc.Yum.managers;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@ public class PluginInfo implements Serializable {
 | 
			
		||||
        try {
 | 
			
		||||
            NMSVersion = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
 | 
			
		||||
        } catch (Exception e) {
 | 
			
		||||
            Log.warning("服务器NMS解析失败: " + Bukkit.getServer().getClass().getPackage().getName());
 | 
			
		||||
            Log.w("服务器NMS解析失败: " + Bukkit.getServer().getClass().getPackage().getName());
 | 
			
		||||
            NMSVersion = "NONMS";
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@@ -91,7 +91,7 @@ public class PluginInfo implements Serializable {
 | 
			
		||||
        String ver = version;
 | 
			
		||||
        if (ver == null) {
 | 
			
		||||
            if (plugin.tags != null) {
 | 
			
		||||
                Log.debug("发现存在TAG标签 开始检索: " + NMSVersion);
 | 
			
		||||
                Log.d("发现存在TAG标签 开始检索: " + NMSVersion);
 | 
			
		||||
                for (TagInfo tagInfo : plugin.tags) {
 | 
			
		||||
                    if (tagInfo.tag.equalsIgnoreCase(NMSVersion)) {
 | 
			
		||||
                        sender.sendMessage("§6版本: §b从Tag标签中获取 §e" + NMSVersion + " §b的最新版本...");
 | 
			
		||||
 
 | 
			
		||||
@@ -43,17 +43,19 @@ public class RepoCache implements Serializable {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Repositories getRepo(String repo) {
 | 
			
		||||
        String json = HttpKit.get(repo);
 | 
			
		||||
        if (json.isEmpty()) {
 | 
			
		||||
            Log.console("§c源地址获取数据为空 §b" + repo);
 | 
			
		||||
        try {
 | 
			
		||||
            String json = HttpKit.get(repo);
 | 
			
		||||
            Repositories reposes = new Repositories((JSONObject) JSONValue.parse(json));
 | 
			
		||||
            if (reposes.repos.isEmpty()) {
 | 
			
		||||
                Log.console("§c源地址解析Json为空 §b" + repo);
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
            return reposes;
 | 
			
		||||
        } catch (Exception e) {
 | 
			
		||||
            Throwable ex = e.getCause();
 | 
			
		||||
            Log.console("§c源地址获取数据为空 §b%s §c异常: %s: %s", repo, ex.getClass().getName(), ex.getLocalizedMessage());
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        Repositories reposes = new Repositories((JSONObject) JSONValue.parse(json));
 | 
			
		||||
        if (reposes.repos.isEmpty()) {
 | 
			
		||||
            Log.console("§c源地址解析Json为空 §b" + repo);
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        return reposes;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Map<String, Repositories> getRepos() {
 | 
			
		||||
 
 | 
			
		||||
@@ -9,31 +9,31 @@ commands:
 | 
			
		||||
  yum:
 | 
			
		||||
    description: MC插件仓库
 | 
			
		||||
    aliases: [y,apt-get]
 | 
			
		||||
    usage: §6使用§a/yum help§6查看帮助!
 | 
			
		||||
    usage: §6使用 §a/yum help §6查看帮助!
 | 
			
		||||
    permission: yum.use
 | 
			
		||||
    permission-message: §c你没有 <permission> 的权限来执行此命令!
 | 
			
		||||
  net:
 | 
			
		||||
    description: MC插件网络管理
 | 
			
		||||
    aliases: [n]
 | 
			
		||||
    usage: §6使用§a/net help§6查看帮助!
 | 
			
		||||
    usage: §6使用 §a/net help §6查看帮助!
 | 
			
		||||
    permission: net.use
 | 
			
		||||
    permission-message: §c你没有 <permission> 的权限来执行此命令!
 | 
			
		||||
  file:
 | 
			
		||||
    description: MC文件管理命令
 | 
			
		||||
    aliases: [f]
 | 
			
		||||
    usage: §6使用§a/file help§6查看帮助!
 | 
			
		||||
    usage: §6使用 §a/file help §6查看帮助!
 | 
			
		||||
    permission: file.use
 | 
			
		||||
    permission-message: §c你没有 <permission> 的权限来执行此命令!
 | 
			
		||||
  security:
 | 
			
		||||
    description: MC安全管理命令
 | 
			
		||||
    aliases: [s]
 | 
			
		||||
    usage: §6使用§a/security help§6查看帮助!
 | 
			
		||||
    usage: §6使用 §a/security help §6查看帮助!
 | 
			
		||||
    permission: security.use
 | 
			
		||||
    permission-message: §c你没有 <permission> 的权限来执行此命令!
 | 
			
		||||
  monitor: 
 | 
			
		||||
    description: MC系统监控命令
 | 
			
		||||
    aliases: [mi]
 | 
			
		||||
    usage: §6使用§a/monitor help§6查看帮助!
 | 
			
		||||
    usage: §6使用 §a/monitor help §6查看帮助!
 | 
			
		||||
    permission: monitor.use
 | 
			
		||||
    permission-message: §c你没有 <permission> 的权限来执行此命令!
 | 
			
		||||
permissions:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user