版本更新至 3.57
修复:Language2Value 对象的 asString() 方法无法识别变量的问题 修复:插件卸载时已注册的时间检查器不注销 修复:插件无法启动的语法错误
This commit is contained in:
parent
3984c81658
commit
417e720f66
@ -70,7 +70,6 @@ public class JavaShell {
|
|||||||
|
|
||||||
javaShellFolder = new File(Main.getInst().getDataFolder(), "JavaShells");
|
javaShellFolder = new File(Main.getInst().getDataFolder(), "JavaShells");
|
||||||
if (!javaShellFolder.exists()) {
|
if (!javaShellFolder.exists()) {
|
||||||
Main.getInst().saveResource("JavaShells/lib/com.sun.tools.jar", true);
|
|
||||||
Main.getInst().saveResource("JavaShells/scripts/-testshell.java", true);
|
Main.getInst().saveResource("JavaShells/scripts/-testshell.java", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,6 +88,12 @@ public class JavaShell {
|
|||||||
libFolder.mkdir();
|
libFolder.mkdir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File tools = new File(Main.getInst().getDataFolder(), "JavaShells/lib/com.sun.tools.jar");
|
||||||
|
if (!tools.exists()) {
|
||||||
|
MsgUtils.warn("&4JavaShell &c工具的必要依赖 &4com.sun.tools.jar &c不存在, 功能关闭!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
loadLibrary();
|
loadLibrary();
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.event.server.PluginDisableEvent;
|
|||||||
import me.skymc.taboolib.message.MsgUtils;
|
import me.skymc.taboolib.message.MsgUtils;
|
||||||
import me.skymc.taboolib.mysql.MysqlUtils;
|
import me.skymc.taboolib.mysql.MysqlUtils;
|
||||||
import me.skymc.taboolib.mysql.protect.MySQLConnection;
|
import me.skymc.taboolib.mysql.protect.MySQLConnection;
|
||||||
|
import me.skymc.taboolib.timecycle.TimeCycleManager;
|
||||||
|
|
||||||
public class ListenerPluginDisable implements Listener {
|
public class ListenerPluginDisable implements Listener {
|
||||||
|
|
||||||
@ -23,6 +24,9 @@ public class ListenerPluginDisable implements Listener {
|
|||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
MsgUtils.send("已停止插件 &f" + e.getPlugin().getName() + "&7 的 &f" + i + "&7 条数据库连接");
|
MsgUtils.send("已停止插件 &f" + e.getPlugin().getName() + "&7 的 &f" + i + "&7 条数据库连接");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 注销时间周期
|
||||||
|
TimeCycleManager.cancel(e.getPlugin());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ public class Language2Value {
|
|||||||
return new Language2Json(this, null).getText().toString();
|
return new Language2Json(this, null).getText().toString();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return languageValue.size() == 0 ? ChatColor.DARK_RED + "[<ERROR-1>]" : languageValue.get(0);
|
return languageValue.size() == 0 ? ChatColor.DARK_RED + "[<ERROR-1>]" : setPlaceholder(languageValue.get(0), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user