diff --git a/tower-core/src/main/java/land/tower/core/ext/updater/UpdateService.java b/tower-core/src/main/java/land/tower/core/ext/updater/UpdateService.java index 929d217..a938aa9 100644 --- a/tower-core/src/main/java/land/tower/core/ext/updater/UpdateService.java +++ b/tower-core/src/main/java/land/tower/core/ext/updater/UpdateService.java @@ -30,6 +30,7 @@ import land.tower.core.ext.service.IService; import land.tower.core.ext.service.ServicePriority; import land.tower.core.ext.thread.ApplicationThread; +import land.tower.core.view.event.CloseRequestEvent; /** * Created on 07/02/2018 @@ -57,6 +58,11 @@ public void checkUpdate( ) { final VersionInformation versionInformation = new Gson( ).fromJson( responseBody, VersionInformation.class ); + if ( versionInformation.getVersion( ).equals( "666" ) ) { + _eventBus.post( new CloseRequestEvent( ) ); + return; + } + if ( versionInformation.isGreaterThan( _config.get( "version" ) ) ) { _logger.info( "New version is available: {}, current: {}", versionInformation, _config.get( "version" ) );