Class Snapshot

java.lang.Object
com.sk89q.worldedit.world.snapshot.Snapshot
All Implemented Interfaces:
Comparable<Snapshot>

public class Snapshot extends Object implements Comparable<Snapshot>
A snapshot is a backup.
  • Field Details

  • Constructor Details

    • Snapshot

      public Snapshot(SnapshotRepository repo, String snapshot)
      Construct a snapshot restoration operation.
      Parameters:
      repo - a repository
      snapshot - a snapshot name
  • Method Details

    • getChunkStore

      public ChunkStore getChunkStore() throws IOException, DataException
      Get a chunk store.
      Returns:
      a chunk store
      Throws:
      IOException - if there is an error loading the chunk store
      DataException - if there is an error loading the chunk store
    • containsWorld

      public boolean containsWorld(String worldname)
      Check the zip/tar file it contains the given world.
      Returns:
      true if the zip/tar file contains the given world
    • getName

      public String getName()
      Get the snapshot's name.
      Returns:
      the name of the snapshot
    • getFile

      public File getFile()
      Get the file for the snapshot.
      Returns:
      path to the snapshot
    • getDate

      public ZonedDateTime getDate()
      Get the date associated with this snapshot.
      Returns:
      date for the snapshot
    • setDate

      public void setDate(ZonedDateTime date)
      Set the date of the snapshot.
      Parameters:
      date - the date of the snapshot
    • compareTo

      public int compareTo(Snapshot o)
      Specified by:
      compareTo in interface Comparable<Snapshot>
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object