Class SlotIteratorPattern.Builder
java.lang.Object
io.github.rysefoxx.inventory.plugin.pattern.SlotIteratorPattern.Builder
- Enclosing class:
SlotIteratorPattern
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull SlotIteratorPattern.Builderattach(char frame) Using this method, you can decide which frame will receive the items.@NotNull SlotIteratorPatternBuilds the pattern.@NotNull SlotIteratorPattern.BuilderDefines the pattern.@NotNull SlotIteratorPattern.BuilderDefines the pattern.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
define
@Contract("_ -> this") @NotNull public @NotNull SlotIteratorPattern.Builder define(String @NotNull ... lines) throws IllegalArgumentException Defines the pattern.- Parameters:
lines- The lines of the pattern.- Returns:
- The builder.
- Throws:
IllegalArgumentException- If the line length is not 9.
-
define
@NotNull public @NotNull SlotIteratorPattern.Builder define(@NotNull @NotNull String line, @Nonnegative int amount) throws IllegalArgumentException Defines the pattern.- Parameters:
line- The line of the pattern.amount- How often this pattern should be repeated.- Returns:
- The builder.
- Throws:
IllegalArgumentException- If the line length is not 9 or the amount is higher than 6.
-
attach
@Contract(value="_ -> this", mutates="this") @NotNull public @NotNull SlotIteratorPattern.Builder attach(char frame) Using this method, you can decide which frame will receive the items.- Parameters:
frame- The frame to place the items in.- Returns:
- The builder.
-
buildPattern
Builds the pattern.- Returns:
- The pattern.
- Throws:
IllegalStateException- If no pattern have been defined.
-