WebGUI 2.6.0 (26.3 NeoForge)
Curse Maven Snippet
What's new
2.6.0 - 2026-12-02
The mod only; the Paper plugin stays at 2.5.0, unchanged.
Added
- Game sounds, for pages.
window.webgui.playSound('minecraft:ui.button.click', { volume, pitch })plays one of the game's sounds the way the game plays its own menu sounds: not positional, and under the player's Master volume, which an<audio>element ignores. No sound files to ship, and any sound the game knows works, including those a server resource pack adds. Volume is 0–1 and pitch 0.5–2, both 1 by default; the game's own buttons click at volume 0.25. An unknown id is ignored, and a page may play twenty a second; the rest are dropped. It never reaches the server. (#46) - What the player carries, for pages.
window.webgui.clientnow hasselectedSlot,hotbar(nine slots),inventory(the 27 main slots),offhand,armor(head,chest,legs,feet),armorValue,effects({ id, amplifier, duration, ambient }, duration in ticks and -1 for an effect without an end),air,maxAirandxpProgress. An item is{ id, count, name, damage?, maxDamage?, enchanted }and an empty slot isnull. A page can replace the hotbar, the armor bar and the effect icons, or grey out "Sell" for an item the player does not have, without the server sending the same data again. (#45) - The world and the vanilla HUD, for pages.
window.webgui.client.worldhas the time of day (time, 0–23999),day,weather(clear,rainorthunder), thebiomeand the block and skylightat the player's feet. Alongside it:bossBars({ id, name, json, progress, color, overlay }), thesidebaras the game draws it (the team-colour sidebar first, at most 15 lines, highest score on top, scores formatted as the objective says,jsonfor the colours), and thetitleandactionBaron screen right now,nullonce they fade. Enough for a clock, a weather indicator, a styled boss bar or a sidebar of your own. (#53)- The client state is still sent only when something in it changed; with all of this it is about 2 KB.
- Hiding the vanilla HUD, for pages.
window.webgui.hideVanilla(['hotbar', 'health'])hides the vanilla elements a page draws itself:hotbar,health(hearts, armor, food and air),effects,crosshair,bossbar,sidebar,titleandactionbar;hideVanilla([])shows them again. They stay hidden only while the page that asked is on screen, and come back on their own when it closes, navigates or reloads, so a player is never left without a hotbar because of a page that is gone. On 1.20.1 the title and the action bar cannot be hidden. (#84)
This mod has no additional files