Class WebRequirementAutoRegisterHandler
java.lang.Object
de.craftsblock.craftsnet.autoregister.AutoRegisterHandler<WebRequirement>
de.craftsblock.craftsnet.autoregister.builtin.http.WebRequirementAutoRegisterHandler
A handler for automatically registering
WebRequirement implementations. This class extends
AutoRegisterHandler and provides a concrete implementation for handling the registration of
WebRequirement instances into the requirement registry of CraftsNet.- Since:
- 3.2.0-SNAPSHOT
-
Field Summary
Fields inherited from class de.craftsblock.craftsnet.autoregister.AutoRegisterHandler
craftsNet -
Constructor Summary
ConstructorsConstructorDescriptionWebRequirementAutoRegisterHandler(CraftsNet craftsNet) Constructs a newWebRequirement. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanhandle(WebRequirement webRequirement, AutoRegisterInfo info, Object... args) Handles the registration of the providedWebRequirement.Methods inherited from class de.craftsblock.craftsnet.autoregister.AutoRegisterHandler
getCraftsNet
-
Constructor Details
-
WebRequirementAutoRegisterHandler
Constructs a newWebRequirement.- Parameters:
craftsNet- TheCraftsNetinstance used for managing the requirement registry.
-
-
Method Details
-
handle
Handles the registration of the providedWebRequirement.This method attempts to register the given
WebRequirementwith theCraftsNet.getRequirementRegistry()of the associatedCraftsNetinstance. If registration is successful, the method returnstrue.- Specified by:
handlein classAutoRegisterHandler<WebRequirement>- Parameters:
webRequirement- TheWebRequirementto be registered.args- Additional arguments (not used in this implementation but provided for extensibility).info- TheAutoRegisterInfowhich holds more information about the object.- Returns:
trueif the registration was successful,falseotherwise.
-