Class WorldEditManager

java.lang.Object
ua.mcchickenstudio.opencreative.managers.blocks.WorldEditManager
All Implemented Interfaces:
BlocksManager, Manager, ShutDownable, Startable, Toggleable

public final class WorldEditManager extends Object implements BlocksManager, Toggleable

WorldEditManager

This class represents a manager, that controls changing many blocks, using WorldEdit.
  • 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: BlocksManager
      Sets 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:
      setBlocksType in interface BlocksManager
      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: Startable
      Does tasks on start.
      Specified by:
      start in interface Startable
    • isWorking

      public boolean isWorking()
      Description copied from interface: Toggleable
      Checks whether manager was started successfully and it currently works.
      Specified by:
      isWorking in interface Toggleable
      Returns:
      true - started up, false - shut downed.
    • shutdown

      public void shutdown()
      Description copied from interface: ShutDownable
      Does tasks on shutdown.
      Specified by:
      shutdown in interface ShutDownable
    • getName

      @NotNull public @NotNull String getName()
      Description copied from interface: Manager
      Returns name of manager, that will be displayed by request in the logs.
      Specified by:
      getName in interface Manager
      Returns:
      name of manager.