Interface VersionFetcher

All Known Implementing Classes:
VersionFetcher.DummyVersionFetcher

@NullMarked public interface VersionFetcher
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Amount of time to cache results for in milliseconds
    Gets the version message to cache and show to command senders.
    default Component
    getVersionMessage(String serverVersion)
    Deprecated.
    serverVersion is not required
  • Method Details

    • getCacheTime

      long getCacheTime()
      Amount of time to cache results for in milliseconds

      Negative values will never cache.

      Returns:
      cache time
    • getVersionMessage

      Component getVersionMessage()
      Gets the version message to cache and show to command senders.
      Returns:
      the message to show when requesting a version
      API Note:
      This method may involve a web request which will block the executing thread
    • getVersionMessage

      @Deprecated default Component getVersionMessage(String serverVersion)
      Deprecated.
      serverVersion is not required
      Gets the version message to cache and show to command senders.
      Parameters:
      serverVersion - the current version of the server (will match Bukkit.getVersion())
      Returns:
      the message to show when requesting a version
      See Also:
      API Note:
      This method may involve a web request which will block the current thread