Cleaned up FillerMask
This commit is contained in:
@@ -54,11 +54,7 @@ public class FillerMask {
|
||||
public FillerMask(@NotNull final MaskMaterials materials,
|
||||
@NotNull final String... pattern) {
|
||||
this(
|
||||
new MaskItems(
|
||||
Arrays.stream(materials.materials())
|
||||
.map(MaterialTestableItem::new)
|
||||
.toArray(MaterialTestableItem[]::new)
|
||||
),
|
||||
materials.toMaskItems(),
|
||||
pattern
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.willfp.eco.core.gui.slot;
|
||||
|
||||
import com.willfp.eco.core.items.Items;
|
||||
import org.bukkit.Material;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -12,5 +13,12 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
@Deprecated(since = "6.24.0")
|
||||
public record MaskMaterials(@NotNull Material... materials) {
|
||||
|
||||
/**
|
||||
* Convert MaskMaterials to MaskItems.
|
||||
*
|
||||
* @return The MaskItems.
|
||||
*/
|
||||
public MaskItems toMaskItems() {
|
||||
return new MaskItems(Items.fromMaterials(this.materials()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user