File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
src/main/java/net/elytrium/velocitytools Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ public class Settings extends YamlSerializable {
4747
4848 public static class MAIN {
4949
50+ @ Comment (@ CommentValue ("Should this plugin check for new updates?" ))
51+ public boolean CHECK_FOR_UPDATES = true ;
52+
5053 @ Comment ({
5154 @ CommentValue ("VelocityTools will consume more RAM if this option is enabled, but compatibility with other plugins will be better" ),
5255 @ CommentValue ("Enable it if you have a plugin installed that bypasses compression (e.g. Geyser)" )
Original file line number Diff line number Diff line change @@ -120,11 +120,15 @@ public void onProxyInitialization(ProxyInitializeEvent event) {
120120
121121 HooksInitializer .init (this .server );
122122
123- if (!UpdatesChecker .checkVersionByURL ("https://raw.githubusercontent.com/Elytrium/VelocityTools/master/VERSION" , Settings .IMP .VERSION )) {
124- LOGGER .error ("****************************************" );
125- LOGGER .warn ("The new VelocityTools update was found, please update." );
126- LOGGER .error ("https://github.com/Elytrium/VelocityTools/releases/" );
127- LOGGER .error ("****************************************" );
123+ if (Settings .IMP .MAIN .CHECK_FOR_UPDATES ) {
124+ this .server .getScheduler ().buildTask (this , () -> {
125+ if (!UpdatesChecker .checkVersionByURL ("https://raw.githubusercontent.com/Elytrium/VelocityTools/master/VERSION" , Settings .IMP .VERSION )) {
126+ LOGGER .error ("****************************************" );
127+ LOGGER .warn ("The new VelocityTools update was found, please update." );
128+ LOGGER .error ("https://github.com/Elytrium/VelocityTools/releases/" );
129+ LOGGER .error ("****************************************" );
130+ }
131+ }).schedule ();
128132 }
129133 this .metricsFactory .make (this , 12708 );
130134 }
You can’t perform that action at this time.
0 commit comments