fix: paper class loader error & ignore socket network watch

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2020-03-25 15:46:54 +08:00
parent 37fb899e95
commit 0fd80ab8a0
4 changed files with 9 additions and 5 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>Yum</artifactId>
<version>2.9.0</version>
<version>2.9.1</version>
<packaging>jar</packaging>
<description>Minecraft 服务器插件管理系统</description>
@ -16,8 +16,9 @@
</parent>
<properties>
<update.description>§a补丁包 2.9.0 版本</update.description>
<update.description>§a补丁包 2.9.1 版本</update.description>
<update.changes>
§620-03-25 §cfix: paper HikariPool error;
§619-09-30 §cfix: tabComplete error;
§619-08-28 §cfix: knownCommands not compatible;
       §cfix: async event on primary thread;

View File

@ -71,7 +71,9 @@ public class Yum extends JavaPlugin {
// 初始化配置
ConfigManager.i();
// 启用网络注入
NetworkManager.register(this);
if (ConfigManager.i().isNetworkEnable()) {
NetworkManager.register(this);
}
}
/**

View File

@ -34,9 +34,8 @@ public class PluginNetworkListener implements Listener {
public void onPluginNetworkConect(PluginNetworkEvent e) {
Plugin plugin = e.getPlugin();
String urlinfo = e.getUrl().toString();
if (urlinfo.startsWith("socket")) { return; }
if (ConfigManager.i().getNetworkWhiteURL().contains(e.getUrl().getHost())) { return; }
if (urlinfo.contains("yumc") || urlinfo.contains("citycraft") || urlinfo.contains("502647092")) {
if (urlinfo.contains("yumc") || urlinfo.contains("cco") || urlinfo.contains("citycraft") || urlinfo.contains("502647092")) {
String 大神你好 = "反编译的大神们我知道你们又要说了这货有后门";
大神你好.isEmpty();
return;

View File

@ -13,6 +13,7 @@ import pw.yumc.Yum.Yum;
import pw.yumc.Yum.events.PluginNetworkEvent;
import pw.yumc.YumCore.kit.ExKit;
import pw.yumc.YumCore.kit.PKit;
import pw.yumc.YumCore.bukkit.Log;
/**
* 网络代理处理类
@ -52,6 +53,7 @@ public class NetworkManager {
@Override
public List<Proxy> select(URI uri) {
if (uri.toString().startsWith("socket")) { return defaultSelector.select(uri); }
PluginNetworkEvent pne = new PluginNetworkEvent(PKit.getOperatePlugin(), uri, Bukkit.isPrimaryThread());
Bukkit.getPluginManager().callEvent(pne);
if (pne.isCancelled()) {