java.lang.Object
ua.mcchickenstudio.opencreative.indev.coding6.Actions6

public final class Actions6 extends Object
  • Constructor Details

    • Actions6

      public Actions6()
  • Method Details

    • getInstance

      @NotNull public static @NotNull Actions6 getInstance()
      Returns instance of actions controller class.
      Returns:
      instance of actions.
    • registerAction6

      public void registerAction6(@NotNull @NotNull Action6 action)
      Registers action, that will be replaced in coding.
      Parameters:
      action - action to register.
    • registerAction

      public void registerAction(@NotNull @NotNull Action6... actions)
      Registers actions, that will be replaced in coding.
      Parameters:
      actions - actions to register.
    • unregisterAction

      public void unregisterAction(@NotNull @NotNull Action6 action)
      Unregisters action if list contains it.
      Parameters:
      action - action to unregister.
    • getActions

      @NotNull public @NotNull List<Action6> getActions()
      Returns a copy of list that contains all registered actions.
      Returns:
      actions list.
    • getByCategories

      @NotNull public @NotNull List<Action6> getByCategories(@NotNull @NotNull ActionCategory actionCategory, @NotNull @NotNull MenusCategory menusCategory)
      Returns list of actions, that have same menu category.
      Parameters:
      actionCategory - action category.
      menusCategory - menu category.
      Returns:
      list of actions with specified menu category.
    • getCategories

      @NotNull public @NotNull List<MenusCategory> getCategories(@NotNull @NotNull ActionCategory actionCategory)
      Returns list of all menu categories of specified action category..
      Parameters:
      actionCategory - action category.
      Returns:
      list of menu categories.
    • exists

      public boolean exists(@NotNull @NotNull String id)
      Checks if action with specified ID exists in registry.
      Parameters:
      id - id of action.
      Returns:
      true - exists, false - not exists.
    • exists

      public boolean exists(@NotNull @NotNull Class<? extends Action6> clazz)
      Checks if action with specified class exists in registry.
      Parameters:
      clazz - class of action.
      Returns:
      true - exists, false - not exists.
    • getByClass

      @Nullable public @Nullable Action6 getByClass(@NotNull @NotNull Class<? extends Action6> clazz)
      Returns action from registry by specified class if it exists, otherwise will return null.
      Parameters:
      clazz - class to get action.
      Returns:
      action - if exists, or null - not exists.
    • getById

      @Nullable public @Nullable Action6 getById(@NotNull @NotNull String id)
      Returns action from registry by specified id if it exists, otherwise will return null.
      Parameters:
      id - id to get action.
      Returns:
      action - if exists, or null - not exists.
    • getByBlock

      @Nullable public @Nullable Action6 getByBlock(@NotNull @NotNull org.bukkit.block.Block block)
      Returns action from registry by specified block if it exists, otherwise will return null.
      Parameters:
      block - block to get action.
      Returns:
      action - if exists, or null - not exists.