java.lang.Object
ua.mcchickenstudio.opencreative.managers.modules.Moduler
All Implemented Interfaces:
Manager, ModuleManager, ShutDownable, Startable, Toggleable

public final class Moduler extends Object implements ModuleManager
  • Constructor Details

    • Moduler

      public Moduler()
  • Method Details

    • start

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

      public void shutdown()
      Description copied from interface: ShutDownable
      Does tasks on shutdown.
      Specified by:
      shutdown in interface ShutDownable
    • 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.
    • generateModuleId

      public static int generateModuleId()
    • getModuleById

      @Nullable public @Nullable Module getModuleById(@NotNull @NotNull String id)
      Description copied from interface: ModuleManager
      Returns module by its ID.
      Specified by:
      getModuleById in interface ModuleManager
      Parameters:
      id - id to get module.
      Returns:
      module - if found, or null - not exists.
    • getModules

      @NotNull public @NotNull Set<Module> getModules()
      Description copied from interface: ModuleManager
      Returns set of all registered modules in base.
      Specified by:
      getModules in interface ModuleManager
      Returns:
      set of modules.
    • getPlayerModules

      @NotNull public @NotNull Set<Module> getPlayerModules(@NotNull @NotNull UUID uuid)
      Description copied from interface: ModuleManager
      Returns modules, that were made by player with specified unique ID.
      Specified by:
      getPlayerModules in interface ModuleManager
      Parameters:
      uuid - unique id of player.
      Returns:
      set of player created modules.
    • registerModule

      public void registerModule(@NotNull @NotNull Module module)
      Description copied from interface: ModuleManager
      Register a module to base, so it will be visible in modules browser menu.
      Specified by:
      registerModule in interface ModuleManager
      Parameters:
      module - module to register
    • createModule

      public void createModule(@NotNull @NotNull org.bukkit.entity.Player owner, @NotNull @NotNull DevPlanet devPlanet, @NotNull @NotNull Set<org.bukkit.Location> locations)
      Description copied from interface: ModuleManager
      Creates a new module and registers it in base.
      Specified by:
      createModule in interface ModuleManager
      Parameters:
      owner - owner of module.
      devPlanet - dev planet to parse executor locations.
      locations - set of location, that contains executors.
    • deleteModule

      public void deleteModule(@NotNull @NotNull Module module)
      Description copied from interface: ModuleManager
      Deletes module from files and base.
      Specified by:
      deleteModule in interface ModuleManager
      Parameters:
      module - module to delete.
    • 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.