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
    getVersionMessage(String serverVersion)
    Gets the version message to cache and show to command senders.
  • 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(String serverVersion)
      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

      Parameters:
      serverVersion - the current version of the server (will match Bukkit.getVersion())
      Returns:
      the message to show when requesting a version