Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion documentation/ecoenchants/plugin-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ enchantinfo:
# Options for the enchant GUI.
enchant-gui:
rows: 6 # How many rows to have in the GUI
title: "Enchant GUI" # The title of the GUI
title: "Enchant GUI &7(%page%/%max_page%)" # The title of the GUI

mask: # The background material
items:
Expand Down Expand Up @@ -157,12 +157,20 @@ enchant-gui:

# Options for the page change buttons
page-change:
# The sound played when the page is changed
sound:
enabled: true
sound: ui.button.click
pitch: 1.0
volume: 1.0
forwards:
item: arrow name:"&fNext Page" # The item. Will not show if on the last page.
item-inactive: gray_dye name:"&7Next Page" # The item shown on the last page
row: 6
column: 6
backwards:
item: arrow name:"&fPrevious Page" # The item. Will not show if on the first page.
item-inactive: gray_dye name:"&7Previous Page" # The item shown on the first page
row: 6
column: 4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import com.willfp.eco.core.config.base.LangYml
import com.willfp.eco.core.drops.DropQueue
import com.willfp.eco.core.fast.fast
import com.willfp.eco.core.gui.GUIComponent
import com.willfp.eco.core.gui.addPageChanger
import com.willfp.eco.core.gui.menu
import com.willfp.eco.core.gui.menu.Menu
import com.willfp.eco.core.gui.menu.MenuLayer
import com.willfp.eco.core.gui.page.Page
import com.willfp.eco.core.gui.page.PageChanger
import com.willfp.eco.core.gui.slot
Expand All @@ -19,6 +19,7 @@ import com.willfp.eco.core.items.Items
import com.willfp.eco.core.items.builder.EnchantedBookBuilder
import com.willfp.eco.core.items.builder.ItemStackBuilder
import com.willfp.eco.core.items.isEcoEmpty
import com.willfp.eco.core.sound.PlayableSound
import com.willfp.eco.util.formatEco
import com.willfp.eco.util.lineWrap
import com.willfp.ecoenchants.display.EnchantSorter.sortForDisplay
Expand Down Expand Up @@ -141,17 +142,18 @@ object EnchantGUI {
pane
)

val pageChangeSound = PlayableSound.create(
plugin.configYml.getSubsection("enchant-gui.page-change.sound")
)

for (direction in PageChanger.Direction.entries) {
val directionName = direction.name.lowercase()

addComponent(
MenuLayer.TOP,
plugin.configYml.getInt("enchant-gui.page-change.$directionName.row"),
plugin.configYml.getInt("enchant-gui.page-change.$directionName.column"),
PageChanger(
Items.lookup(plugin.configYml.getString("enchant-gui.page-change.$directionName.item")).item,
direction
)
addPageChanger(
plugin.configYml,
"enchant-gui.page-change.$directionName",
direction,
pageChangeSound
)
}

Expand Down
10 changes: 9 additions & 1 deletion eco-core/core-plugin/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ enchantinfo:
# Options for the enchant GUI.
enchant-gui:
rows: 6 # How many rows to have in the GUI
title: "Enchant GUI" # The title of the GUI
title: "Enchant GUI &7(%page%/%max_page%)" # The title of the GUI

mask: # The background material
items:
Expand Down Expand Up @@ -146,12 +146,20 @@ enchant-gui:

# Options for the page change buttons
page-change:
# The sound played when the page is changed
sound:
enabled: true
sound: ui.button.click
pitch: 1.0
volume: 1.0
forwards:
item: arrow name:"&fNext Page" # The item. Will not show if on the last page.
item-inactive: gray_dye name:"&7Next Page" # The item shown on the last page
row: 6
column: 6
backwards:
item: arrow name:"&fPrevious Page" # The item. Will not show if on the first page.
item-inactive: gray_dye name:"&7Previous Page" # The item shown on the first page
row: 6
column: 4

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#libreforge-updater
#Wed Jun 10 19:44:44 BST 2026
eco-version=7.6.0
eco-version=2026.24
kotlin.code.style=official
kotlin.daemon.jvmargs=-Xmx2g -XX\:+UseG1GC -XX\:MaxMetaspaceSize\=512m
libreforge-version=5.7.0
libreforge-version=2026.24
org.gradle.parallel=true
version=2026.24
Loading