9
0
mirror of https://github.com/Auxilor/Reforges.git synced 2025-12-27 02:49:13 +00:00

Fixed maskmaterials

This commit is contained in:
Auxilor
2022-04-02 14:07:12 +01:00
parent 62c5555eb0
commit 86a6e73a8f

View File

@@ -7,7 +7,7 @@ import com.willfp.eco.core.gui.menu
import com.willfp.eco.core.gui.menu.Menu
import com.willfp.eco.core.gui.slot
import com.willfp.eco.core.gui.slot.FillerMask
import com.willfp.eco.core.gui.slot.MaskMaterials
import com.willfp.eco.core.gui.slot.MaskItems
import com.willfp.eco.core.gui.slot.Slot
import com.willfp.eco.core.items.Items
import com.willfp.eco.core.items.builder.ItemStackBuilder
@@ -114,8 +114,8 @@ object ReforgeGUI {
val maskPattern = plugin.configYml.getStrings("gui.mask.pattern").toTypedArray()
val maskMaterials = plugin.configYml.getStrings("gui.mask.materials")
.mapNotNull { Material.getMaterial(it.uppercase()) }
val maskItems = plugin.configYml.getStrings("gui.mask.materials")
.mapNotNull { Items.lookup(it) }
.toTypedArray()
val allowItem = Items.lookup(plugin.configYml.getString("gui.show-allowed.allow-material")).item
@@ -124,7 +124,7 @@ object ReforgeGUI {
menu = menu(plugin.configYml.getInt("gui.rows")) {
setTitle(plugin.langYml.getFormattedString("menu.title"))
setMask(FillerMask(MaskMaterials(*maskMaterials), *maskPattern))
setMask(FillerMask(MaskItems(*maskItems), *maskPattern))
modfiy { builder ->
val slot = Slot.builder(
ItemStackBuilder(Material.BLACK_STAINED_GLASS_PANE)