perf: 简化代码
This commit is contained in:
@@ -7,7 +7,6 @@ import cn.hamster3.mc.plugin.core.common.util.UpdateCheckUtils;
|
||||
import lombok.Getter;
|
||||
import net.kyori.adventure.platform.bungeecord.BungeeAudiences;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
|
||||
import java.io.File;
|
||||
@@ -73,10 +72,7 @@ public class HamsterCorePlugin extends Plugin {
|
||||
}
|
||||
try (InputStreamReader reader = new InputStreamReader(stream, StandardCharsets.UTF_8)) {
|
||||
YamlConfig config = YamlConfig.load(reader);
|
||||
UpdateCheckUtils.showUpdate(
|
||||
plugin.getDescription().getName(), config,
|
||||
(s) -> ProxyServer.getInstance().getConsole().sendMessage(TextComponent.fromLegacyText(s))
|
||||
);
|
||||
UpdateCheckUtils.checkUpdate(plugin.getDescription().getName(), config);
|
||||
}
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
|
Reference in New Issue
Block a user