Class VersionChecker

java.lang.Object
com.djrapitops.plan.version.VersionChecker
All Implemented Interfaces:
SubSystem
Direct Known Subclasses:
FabricVersionChecker, SpongeVersionChecker

@Singleton public class VersionChecker extends Object implements SubSystem
System for checking if new Version is available when the System initializes.
  • Field Details

    • currentVersion

      protected final VersionNumber currentVersion
    • locale

      protected final Locale locale
    • config

      protected final PlanConfig config
    • logger

      protected final net.playeranalytics.plugin.server.PluginLogger logger
    • runnableFactory

      protected final net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory
    • errorLogger

      protected final ErrorLogger errorLogger
    • newVersionAvailable

      protected VersionInfo newVersionAvailable
  • Constructor Details

    • VersionChecker

      @Inject public VersionChecker(@Named("currentVersion") String currentVersion, Locale locale, PlanConfig config, net.playeranalytics.plugin.server.PluginLogger logger, net.playeranalytics.plugin.scheduling.RunnableFactory runnableFactory, ErrorLogger errorLogger)
  • Method Details

    • isNewVersionAvailable

      public boolean isNewVersionAvailable()
    • loadVersionInfo

      protected Optional<List<VersionInfo>> loadVersionInfo()
    • enable

      public void enable()
      Description copied from interface: SubSystem
      Performs enable actions for the subsystem.
      Specified by:
      enable in interface SubSystem
    • disable

      public void disable()
      Description copied from interface: SubSystem
      Performs disable actions for the subsystem
      Specified by:
      disable in interface SubSystem
    • getNewVersionAvailable

      public Optional<VersionInfo> getNewVersionAvailable()
    • getUpdateButton

      public Optional<String> getUpdateButton()
    • getCurrentVersionButton

      public String getCurrentVersionButton()
    • getUpdateModal

      public String getUpdateModal()
    • getCurrentVersion

      public String getCurrentVersion()