Class Actions6
java.lang.Object
ua.mcchickenstudio.opencreative.indev.coding6.Actions6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if action with specified class exists in registry.booleanChecks if action with specified ID exists in registry.Returns a copy of list that contains all registered actions.@Nullable Action6getByBlock(@NotNull org.bukkit.block.Block block) Returns action from registry by specified block if it exists, otherwise will return null.getByCategories(@NotNull ActionCategory actionCategory, @NotNull MenusCategory menusCategory) Returns list of actions, that have same menu category.@Nullable Action6getByClass(@NotNull Class<? extends Action6> clazz) Returns action from registry by specified class if it exists, otherwise will return null.@Nullable Action6Returns action from registry by specified id if it exists, otherwise will return null.@NotNull List<MenusCategory> getCategories(@NotNull ActionCategory actionCategory) Returns list of all menu categories of specified action category..static @NotNull Actions6Returns instance of actions controller class.voidregisterAction(@NotNull Action6... actions) Registers actions, that will be replaced in coding.voidregisterAction6(@NotNull Action6 action) Registers action, that will be replaced in coding.voidunregisterAction(@NotNull Action6 action) Unregisters action if list contains it.
-
Constructor Details
-
Actions6
public Actions6()
-
-
Method Details
-
getInstance
Returns instance of actions controller class.- Returns:
- instance of actions.
-
registerAction6
Registers action, that will be replaced in coding.- Parameters:
action- action to register.
-
registerAction
Registers actions, that will be replaced in coding.- Parameters:
actions- actions to register.
-
unregisterAction
Unregisters action if list contains it.- Parameters:
action- action to unregister.
-
getActions
Returns a copy of list that contains all registered actions.- Returns:
- actions list.
-
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
Checks if action with specified ID exists in registry.- Parameters:
id- id of action.- Returns:
- true - exists, false - not exists.
-
exists
Checks if action with specified class exists in registry.- Parameters:
clazz- class of action.- Returns:
- true - exists, false - not exists.
-
getByClass
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
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
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.
-