Package fr.maxlego08.menu.api.button
Interface PermissibleButton
- All Known Subinterfaces:
BackButton,Button,HomeButton,InventoryButton,NextButton,NoneButton,PaginateButton,PreviousButton
public interface PermissibleButton
The PermissibleButton interface manages permissions for buttons.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckPermission(org.bukkit.entity.Player player, fr.maxlego08.menu.inventory.inventories.InventoryDefault inventory, Placeholders placeholders) Checks if the player has the required permission to interact with the button.Returns the button that will be used if the permission condition does not pass.Returns the real parent button.List<fr.maxlego08.menu.api.requirement.permissible.PermissionPermissible>Returns a list of permissions.Returns the parent button.List<fr.maxlego08.menu.api.requirement.permissible.PermissionPermissible>Returns a list of permissions that the player must have.booleanChecks if there is an alternative button to display when the permission condition fails.booleanChecks if the player has the required permissions.
-
Method Details
-
getElseButton
Button getElseButton()Returns the button that will be used if the permission condition does not pass.- Returns:
- The button to be used if the permission condition fails.
-
getParentButton
Button getParentButton()Returns the parent button.- Returns:
- The parent button.
-
getMasterParentButton
Button getMasterParentButton()Returns the real parent button.- Returns:
- The real parent button.
-
getPermissions
List<fr.maxlego08.menu.api.requirement.permissible.PermissionPermissible> getPermissions()Returns a list of permissions that the player must have.- Returns:
- The list of required permissions.
-
getOrPermission
List<fr.maxlego08.menu.api.requirement.permissible.PermissionPermissible> getOrPermission()Returns a list of permissions. The player must have at least one permission from the list.- Returns:
- The list of optional permissions.
-
hasPermission
boolean hasPermission()Checks if the player has the required permissions.- Returns:
- `true` if the player has the required permissions, otherwise `false`.
-
hasElseButton
boolean hasElseButton()Checks if there is an alternative button to display when the permission condition fails.- Returns:
- `true` if there is an alternative button, otherwise `false`.
-