Class RestoreAdapter
java.lang.Object
com.andrei1058.bedwars.api.server.RestoreAdapter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearItems(@NotNull org.bukkit.World world) abstract voidcloneArena(String name1, String name2) Clone an arena world.abstract voidConvert worlds if it is necessary before loading them.abstract voiddeleteWorld(String name) Delete a world.voidforeachBlockInRegion(@Nullable org.bukkit.Location corner1, @Nullable org.bukkit.Location corner2, @NotNull Consumer<org.bukkit.block.Block> consumer) abstract Stringorg.bukkit.plugin.PlugingetOwner()Get adapter owner.Get world container.abstract booleanCheck if given world exists.abstract voidUnload the world.abstract voidLoad the world.voidonLobbyRemoval(@NotNull IArena a) Remove lobby blocks.abstract voidRestore the world.abstract voidUnload the world.abstract voidLoad the world for setting it up.
-
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
Load the world. Arenas will be initialized automatically based on WorldLoadEvent. -
onRestart
Restore the world. call new Arena when it's done. -
onDisable
Unload the world. This is usually used for /bw unloadArena name -
onSetupSessionStart
Load the world for setting it up. -
onSetupSessionClose
Unload the world. -
onLobbyRemoval
Remove lobby blocks. -
isWorld
Check if given world exists. -
deleteWorld
Delete a world. -
cloneArena
Clone an arena world. -
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
-
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)
-