Klasse ArenaStorage

java.lang.Object
de.delinkedde.mobarenareborn.arena.ArenaStorage

public final class ArenaStorage extends Object
Reads and writes Arena instances to per-arena YAML files.

Warps and spawnpoints are stored using Bukkit's built-in Location serialization, which preserves world, position and orientation. The region is stored as its world name and its integer minimum and maximum corners.

  • Konstruktordetails

    • ArenaStorage

      public ArenaStorage()
  • Methodendetails

    • save

      public void save(@NotNull @NotNull Arena arena, @NotNull @NotNull File file) throws IOException
      Serializes an arena to the given file, overwriting any existing content.
      Parameter:
      arena - the arena to write
      file - the destination file
      Löst aus:
      IOException - if the file cannot be written
    • load

      @NotNull public @NotNull Arena load(@NotNull @NotNull File file)
      Loads an arena from the given file.

      Warps and spawnpoints whose world is not loaded are skipped rather than aborting the whole load, so a single broken entry does not discard an otherwise valid arena.

      Parameter:
      file - the source file
      Gibt zurück:
      the loaded arena