Class RestoreAdapter
java.lang.Object
com.andrei1058.bedwars.api.server.RestoreAdapter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearItems
(@NotNull org.bukkit.World world) abstract void
cloneArena
(String name1, String name2) Clone an arena world.abstract void
Convert worlds if it is necessary before loading them.abstract void
deleteWorld
(String name) Delete a world.void
foreachBlockInRegion
(@Nullable org.bukkit.Location corner1, @Nullable org.bukkit.Location corner2, @NotNull Consumer<org.bukkit.block.Block> consumer) abstract String
org.bukkit.plugin.Plugin
getOwner()
Get adapter owner.Get world container.abstract boolean
Check if given world exists.abstract void
Unload the world.abstract void
Load the world.void
onLobbyRemoval
(@NotNull IArena a) Remove lobby blocks.abstract void
Restore the world.abstract void
Unload the world.abstract void
Load 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)
-