Class RequirementHasPerm
java.lang.Object
com.kamikazejam.kamicommon.command.requirement.RequirementAbstract
com.kamikazejam.kamicommon.command.requirement.RequirementHasPerm
- All Implemented Interfaces:
Requirement, Predicate<CommandSender>, Serializable, Predicate<CommandSender>
A
Requirement that passes when the sender holds a permission node, obtained with
get(String) and attached with KamiCommand.addRequirements(Requirement...). The refusal
message is the shared one from KamiCommand.Config rather than one owned by this class. On a root
command with no explicit KamiCommand.setBukkitCommandPermission(String), the Bukkit permission is
derived from the first instance in the requirement list, so a command carrying several should set it.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanapply(@NotNull CommandSender sender, KamiCommand command) @NotNull VersionedComponentcreateErrorMessage(CommandSender sender, KamiCommand command) static @NotNull RequirementHasPermstatic @NotNull VersionedComponentMethods inherited from class RequirementAbstract
apply, createErrorMessage, getDesc, getRequirementsError, isRequirementsMet
-
Constructor Details
-
RequirementHasPerm
-
-
Method Details
-
get
-
apply
-
createErrorMessage
@NotNull public @NotNull VersionedComponent createErrorMessage(CommandSender sender, KamiCommand command) -
getPermissionDeniedMessage
-