Package net.luckperms.api.query
Interface QueryOptions.Builder
- Enclosing interface:
- QueryOptions
Builder for
QueryOptions.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aQueryOptionsinstance from the properties defined to the builder.context(@NonNull ContextSet context) Sets the context.Sets the value of the given flag.Sets the flags.Sets theQueryMode.Sets the value of the given option.
-
Method Details
-
mode
Sets theQueryMode.- Parameters:
mode- the mode to set- Returns:
- this builder
-
context
Sets the context.Note that this is a set operation, not append. Existing contexts will be overridden.
Throws
IllegalStateExceptionif the mode is notQueryMode.CONTEXTUAL.- Parameters:
context- the context to set- Returns:
- this builder
-
flag
Sets the value of the given flag.By default, all
Flags are set to true.- Parameters:
flag- the flagvalue- the value to set- Returns:
- this builder
-
flags
Sets the flags.Note that this is a set operation, not append. Existing flags will be overridden.
By default, all
Flags are set to true.- Parameters:
flags- the flags- Returns:
- this builder
-
option
Sets the value of the given option.Passing
nullin place of a value will clear any existing value set for the key.- Type Parameters:
O- the option type- Parameters:
key- the option keyvalue- the value, or null to clear- Returns:
- this builder
-
build
@NonNull QueryOptions build()Builds aQueryOptionsinstance from the properties defined to the builder.- Returns:
- a
QueryOptionsinstance.
-