Change module load priority
This commit is contained in:
parent
f9c63edc32
commit
b433c54ad8
@ -5,4 +5,6 @@ ERROR-LOADING-LANG: '加载 {0} 插件的语言文件时发生异常:{1}'
|
|||||||
FETCH-LOCALE-ERROR: '语言文件获取失败:{0}'
|
FETCH-LOCALE-ERROR: '语言文件获取失败:{0}'
|
||||||
SEND-LOCALE-ERROR: '语言文件发送失败:{0}'
|
SEND-LOCALE-ERROR: '语言文件发送失败:{0}'
|
||||||
LOCALE-ERROR-REASON: '原因:{0}'
|
LOCALE-ERROR-REASON: '原因:{0}'
|
||||||
MISSING-ARGUMENT: '语言文本含有没有找到的参数 {0}'
|
MISSING-ARGUMENT: '语言文本含有没有找到的参数 {0}'
|
||||||
|
DEPENDENCY-DOWNLOAD-START: ' 正在下载 {0} 库文件'
|
||||||
|
DEPENDENCY-LOAD-FAIL: ' {0} 请求的库文件 {1} 加载失败'
|
@ -1,7 +1,3 @@
|
|||||||
DEPENDENCY:
|
|
||||||
DOWNLOAD-START: ' 正在下载 {0} 库文件'
|
|
||||||
LIBRARY-LOAD-FAIL: ' {0} 请求的库文件 {1} 加载失败'
|
|
||||||
|
|
||||||
LOCALE:
|
LOCALE:
|
||||||
TITLE-SEND-TO-NON-PLAYER: '该语言类型只能发送给玩家:{0}'
|
TITLE-SEND-TO-NON-PLAYER: '该语言类型只能发送给玩家:{0}'
|
||||||
PLUGIN-NOT-FOUND: '无效的语言文件发送形式: &4{0}'
|
PLUGIN-NOT-FOUND: '无效的语言文件发送形式: &4{0}'
|
||||||
|
@ -33,10 +33,10 @@ public abstract class PluginLoader {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoading(Plugin plugin) {
|
public void onLoading(Plugin plugin) {
|
||||||
// 加载语言文件
|
|
||||||
TLocaleLoader.load(plugin, false);
|
|
||||||
// 注入依赖
|
// 注入依赖
|
||||||
TDependencyInjector.inject(plugin, plugin.getClass());
|
TDependencyInjector.inject(plugin, plugin.getClass());
|
||||||
|
// 加载语言文件
|
||||||
|
TLocaleLoader.load(plugin, false);
|
||||||
// 读取插件类
|
// 读取插件类
|
||||||
TabooLibLoader.setupClasses(plugin);
|
TabooLibLoader.setupClasses(plugin);
|
||||||
// 加载插件类
|
// 加载插件类
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package io.izzel.taboolib.module.dependency;
|
package io.izzel.taboolib.module.dependency;
|
||||||
|
|
||||||
import io.izzel.taboolib.TabooLib;
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
|
||||||
import io.izzel.taboolib.util.Files;
|
import io.izzel.taboolib.util.Files;
|
||||||
|
import io.izzel.taboolib.util.Strings;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -57,7 +57,7 @@ public class TDependency {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean downloadMaven(String url, String groupId, String artifactId, String version, File target, String dl) {
|
private static boolean downloadMaven(String url, String groupId, String artifactId, String version, File target, String dl) {
|
||||||
TLocale.Logger.info("DEPENDENCY.DOWNLOAD-START", target.getName());
|
TabooLib.getLogger().info(Strings.replaceWithOrder(TabooLib.getInst().getInternal().getString("DEPENDENCY-DOWNLOAD-START"), target.getName()));
|
||||||
return Files.downloadFile(dl.length() == 0 ? url + "/" + groupId.replace('.', '/') + "/" + artifactId + "/" + version + "/" + artifactId + "-" + version + ".jar" : dl, Files.file(target));
|
return Files.downloadFile(dl.length() == 0 ? url + "/" + groupId.replace('.', '/') + "/" + artifactId + "/" + version + "/" + artifactId + "-" + version + ".jar" : dl, Files.file(target));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
package io.izzel.taboolib.module.dependency;
|
package io.izzel.taboolib.module.dependency;
|
||||||
|
|
||||||
|
import io.izzel.taboolib.TabooLib;
|
||||||
import io.izzel.taboolib.TabooLibAPI;
|
import io.izzel.taboolib.TabooLibAPI;
|
||||||
import io.izzel.taboolib.module.locale.TLocale;
|
import io.izzel.taboolib.util.Strings;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,7 +33,7 @@ public class TDependencyInjector {
|
|||||||
if (TDependency.requestLib(dependency.maven(), dependency.mavenRepo(), dependency.url())) {
|
if (TDependency.requestLib(dependency.maven(), dependency.mavenRepo(), dependency.url())) {
|
||||||
TabooLibAPI.debug(" Loaded " + String.join(":", dependency.maven()) + " (" + name + ")");
|
TabooLibAPI.debug(" Loaded " + String.join(":", dependency.maven()) + " (" + name + ")");
|
||||||
} else {
|
} else {
|
||||||
TLocale.Logger.warn("DEPENDENCY.LIBRARY-LOAD-FAIL", name, String.join(":", dependency.maven()));
|
TabooLib.getLogger().warn(Strings.replaceWithOrder(TabooLib.getInst().getInternal().getString("DEPENDENCY-LOAD-FAIL"), name, String.join(":", dependency.maven())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user