Class ServerFileLoader

All Implemented Interfaces:
ServerLoader

@Singleton public class ServerFileLoader extends Config implements ServerLoader
  • Constructor Details

    • ServerFileLoader

      @Inject public ServerFileLoader(@Named("currentVersion") String currentVersion, PlanFiles files, PlanConfig config)
  • Method Details

    • prepare

      public void prepare() throws IOException
      Throws:
      IOException
    • load

      public Optional<Server> load(ServerUUID loaded)
      Description copied from interface: ServerLoader
      Load the server information.
      Specified by:
      load in interface ServerLoader
      Parameters:
      loaded - UUID of the server, null if not known
      Returns:
      Optional of the saved information or empty if it has not been stored.
    • save

      public void save(Server server)
      Description copied from interface: ServerLoader
      Save the server information.
      Specified by:
      save in interface ServerLoader
      Parameters:
      server - Information to save.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Config
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Config