Class WorldEditManager
java.lang.Object
ua.mcchickenstudio.opencreative.managers.blocks.WorldEditManager
- All Implemented Interfaces:
BlocksManager,Manager,ShutDownable,Startable,Toggleable
WorldEditManager
This class represents a manager, that controls changing many blocks, using WorldEdit.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull StringgetName()Returns name of manager, that will be displayed by request in the logs.booleanChecks whether manager was started successfully and it currently works.@NotNull CompletableFuture<Integer> setBlocksType(@NotNull org.bukkit.Location first, @NotNull org.bukkit.Location second, @NotNull org.bukkit.Material material, int limit) Sets blocks type in region.voidshutdown()Does tasks on shutdown.voidstart()Does tasks on start.
-
Constructor Details
-
WorldEditManager
public WorldEditManager()
-
-
Method Details
-
setBlocksType
@NotNull public @NotNull CompletableFuture<Integer> setBlocksType(@NotNull @NotNull org.bukkit.Location first, @NotNull @NotNull org.bukkit.Location second, @NotNull @NotNull org.bukkit.Material material, int limit) Description copied from interface:BlocksManagerSets blocks type in region.NOTE: thenAccept methods should be used with
BukkitScheduler.runTask(Plugin, Runnable), if they require synchronous usage (changing some blocks after setting area).- Specified by:
setBlocksTypein interfaceBlocksManager- Parameters:
first- begin.second- end.material- material to set.limit- limit of changed blocks.- Returns:
- future with changed blocks amount.
-
start
public void start()Description copied from interface:StartableDoes tasks on start. -
isWorking
public boolean isWorking()Description copied from interface:ToggleableChecks whether manager was started successfully and it currently works.- Specified by:
isWorkingin interfaceToggleable- Returns:
- true - started up, false - shut downed.
-
shutdown
public void shutdown()Description copied from interface:ShutDownableDoes tasks on shutdown.- Specified by:
shutdownin interfaceShutDownable
-
getName
Description copied from interface:ManagerReturns name of manager, that will be displayed by request in the logs.
-