mirror of
https://github.com/Auxilor/EcoMenus.git
synced 2025-12-21 16:09:25 +00:00
Leaving the page unspecified will now make the slot appear on all
This commit is contained in:
@@ -28,7 +28,7 @@ class ConfigurableSlot(
|
||||
) : PositionedComponent {
|
||||
override val row: Int = config.getInt("location.row")
|
||||
override val column: Int = config.getInt("location.column")
|
||||
val page: Int = config.getInt("location.page")
|
||||
val page: Int? = config.getIntOrNull("location.page")
|
||||
|
||||
override val layer = runCatching { enumValueOf<MenuLayer>(config.getString("location.layer").uppercase()) }
|
||||
.getOrElse { MenuLayer.MIDDLE }
|
||||
|
||||
@@ -82,7 +82,7 @@ fun buildMenu(plugin: EcoPlugin, menu: EcoMenu, config: Config): Menu {
|
||||
setMask(mask)
|
||||
|
||||
for (slot in slots) {
|
||||
if (pageNumber != slot.page) {
|
||||
if (slot.page != null && pageNumber != slot.page) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ slots:
|
||||
location:
|
||||
row: 6
|
||||
column: 5
|
||||
page: 1
|
||||
page: 1 # If you don't specify a page, it will be on all pages
|
||||
|
||||
# (Optional) You can specify the layer of the slot.
|
||||
# The layer can be any of: lower, middle, upper, or top (defaults to middle)
|
||||
|
||||
Reference in New Issue
Block a user