Package io.github.rysefoxx.pattern
Class ContentPattern
java.lang.Object
io.github.rysefoxx.pattern.ContentPattern
- Since:
- 6/11/2022
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Defines the pattern to be searched for.void
Defines the pattern to be searched for.void
set(char frame, @NotNull IntelligentItem item)
Places items in the inventory based on the pattern.void
set(char frame, @NotNull org.bukkit.inventory.ItemStack item)
Places items in the inventory based on the pattern.void
set(char frame, @NotNull org.bukkit.inventory.ItemStack item, @NotNull IntelligentType type)
Places items in the inventory based on the pattern.
-
Constructor Details
-
ContentPattern
-
-
Method Details
-
define
Defines the pattern to be searched for.- Parameters:
lines
- The lines of the pattern.- Throws:
IllegalArgumentException
- If the line length is not 9.
-
define
public void define(@NotNull @NotNull String line, @Nonnegative int amount) throws IllegalArgumentExceptionDefines the pattern to be searched for.- Parameters:
line
- The line of the pattern.amount
- How often this pattern should be repeated.- Throws:
IllegalArgumentException
- If the line length is not 9 or the amount is higher than 6.
-
set
Places items in the inventory based on the pattern.- Parameters:
frame
- The frame to place the items in.item
- The item to place.
-
set
public void set(char frame, @NotNull @NotNull org.bukkit.inventory.ItemStack item)Places items in the inventory based on the pattern.- Parameters:
frame
- The frame to place the items in.item
- The item to place.
-
set
public void set(char frame, @NotNull @NotNull org.bukkit.inventory.ItemStack item, @NotNull @NotNull IntelligentType type)Places items in the inventory based on the pattern.- Parameters:
frame
- The frame to place the items in.item
- The item to place.type
- The type of the item.
-
getPattern
- Returns:
- The pattern specified in the
define(String...)
method.
-