Class RestoreAdapter

java.lang.Object
com.andrei1058.bedwars.api.server.RestoreAdapter

public abstract class RestoreAdapter extends Object
  • Constructor Details

    • RestoreAdapter

      public RestoreAdapter(org.bukkit.plugin.Plugin owner)
      Parameters:
      owner - adapter owner.
  • Method Details

    • getOwner

      public org.bukkit.plugin.Plugin getOwner()
      Get adapter owner.
    • onEnable

      public abstract void onEnable(IArena a)
      Load the world. Arenas will be initialized automatically based on WorldLoadEvent.
    • onRestart

      public abstract void onRestart(IArena a)
      Restore the world. call new Arena when it's done.
    • onDisable

      public abstract void onDisable(IArena a)
      Unload the world. This is usually used for /bw unloadArena name
    • onSetupSessionStart

      public abstract void onSetupSessionStart(ISetupSession s)
      Load the world for setting it up.
    • onSetupSessionClose

      public abstract void onSetupSessionClose(ISetupSession s)
      Unload the world.
    • onLobbyRemoval

      public void onLobbyRemoval(@NotNull @NotNull IArena a)
      Remove lobby blocks.
    • isWorld

      public abstract boolean isWorld(String name)
      Check if given world exists.
    • deleteWorld

      public abstract void deleteWorld(String name)
      Delete a world.
    • cloneArena

      public abstract void cloneArena(String name1, String name2)
      Clone an arena world.
    • getWorldsList

      public abstract List<String> getWorldsList()
      Get world container.
    • convertWorlds

      public abstract void convertWorlds()
      Convert worlds if it is necessary before loading them. Let them load on BedWars1058 main Thread, so they will be converted before getting loaded.
    • getDisplayName

      public abstract String getDisplayName()
    • foreachBlockInRegion

      public void foreachBlockInRegion(@Nullable @Nullable org.bukkit.Location corner1, @Nullable @Nullable org.bukkit.Location corner2, @NotNull @NotNull Consumer<org.bukkit.block.Block> consumer)
    • clearItems

      public void clearItems(@NotNull @NotNull org.bukkit.World world)