Class VersionFetcher.DummyVersionFetcher

java.lang.Object
com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher
All Implemented Interfaces:
VersionFetcher
Enclosing interface:
VersionFetcher

public static class VersionFetcher.DummyVersionFetcher extends Object implements VersionFetcher
  • Constructor Details

    • DummyVersionFetcher

      public DummyVersionFetcher()
  • Method Details

    • getCacheTime

      public long getCacheTime()
      Description copied from interface: VersionFetcher
      Amount of time to cache results for in milliseconds

      Negative values will never cache.

      Specified by:
      getCacheTime in interface VersionFetcher
      Returns:
      cache time
    • getVersionMessage

      @NotNull public @NotNull Component getVersionMessage(@NotNull @NotNull String serverVersion)
      Description copied from interface: VersionFetcher
      Gets the version message to cache and show to command senders.

      NOTE: This is run in a new thread separate from that of the command processing thread

      Specified by:
      getVersionMessage in interface VersionFetcher
      Parameters:
      serverVersion - the current version of the server (will match Bukkit.getVersion())
      Returns:
      the message to show when requesting a version