Package org.geysermc.geyser.api.util
Interface Holders.Builder
- All Superinterfaces:
GenericBuilder<Holders>
- Enclosing interface:
Holders
Builder for the Holders object
- Since:
- 2.9.3
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates the Holders object.tag(@NonNull Identifier tag) Sets the tag of the Holders object.with(@NonNull Identifier identifier) Adds a new identifier to the Holders object.
-
Method Details
-
with
Adds a new identifier to the Holders object. This will throw when a tag has been set, since a Holders object can consist of either a tag, or a list of identifiers, not both.- Parameters:
identifier- the identifier to add to the Holders object- Returns:
- this builder
- Throws:
IllegalArgumentException- when a tag has been set- Since:
- 2.9.3
-
tag
Sets the tag of the Holders object. A Holders object can only consist of one tag. This will throw when at least one identifier has been added, since a Holders object can consist of either a tag, or a list of identifiers, not both.- Parameters:
tag- the tag to set- Returns:
- this builder
- Throws:
IllegalArgumentException- when at least one identifier has already been added- Since:
- 2.9.3
-
build
Holders build()Creates the Holders object.- Specified by:
buildin interfaceGenericBuilder<Holders>- Returns:
- the new Holders object
- Since:
- 2.9.3
-