Package de.Keyle.MyPet.api.gui
package de.Keyle.MyPet.api.gui
JSON-defined, section-based inventory menus.
A menu is a MenuDefinition: a resolved blueprint built from Section
records that each own a rectangle of slots. Built-in sections cover backdrops
(FillSection), borders (BorderSection), single slots
(SlotSection), paged lists (PaginatedListSection), sliders
(ValueBarSection) and free player input (StorageSection).
Each section type is registered in SectionTypeRegistry as a
SectionType, pairing its record with a SectionRenderer that draws it and a
JsonCodec that loads it — which is how an addon adds a section type of its own.
Java-side behaviour lives in a MenuHandler, which receives a ClickPayload
per click; GuiService opens menus and MenuInstance is the handle to one
that is open. MenuIds catalogues the built-in menus.
-
ClassDescriptionOuter-ring decoration.Payload routed to
MenuHandler.onClick(de.Keyle.MyPet.api.gui.MenuInstance, java.lang.String, de.Keyle.MyPet.api.gui.ClickPayload)for every click inside a tracked menu.Why aMenuInstanceis closing.Information aJsonCodecneeds at decode time to validate section data against its surrounding menu (bounds, sibling presence, etc.).Generic carrier for sections whose type is registered at runtime (e.g.Backdrop fill.A rectangular part of the menu to fill, instead of the whole thing.Inclusive `[min, max]` float range; samples uniformly.Service facade.Skin source applied to aPLAYER_HEADitem.Deprecated, for removal: This API element is subject to removal in a future version.Pure visual description of one item slot.JSON ↔ section-record bridge.Immutable resolved blueprint for one menu.MenuHandler<C>Per-menu Java logic.MenuId<C>Typed identity of a registered menu.Catalog of built-inMenuIds.Runtime handle for one open menu.Volatile UI state captured when a menu is pushed onto the navigation stack.Rectangular region populated by a per-item template applied to a stream supplied by the menu handler.Mutable carrier for theTagResolvers a section renderer assembles per rendered item.Per-render scratchpad.Sealed marker for every section record.SectionRenderer<S extends Section>Interface a section type implements to render itself into a BukkitInventoryand respond to clicks on the slots it owns.What the menu should do after a renderer has handled a click.SectionType<S extends Section>Pairs a section's type id with its concrete record class, renderer, and codec.Process-wide registry ofSectionTypes by id.Single-slot section.Polymorphic sound description: a fixed sound, a sound with pitch/volume ranges, a uniform-random choice among other specs, or silence.Picks uniformly among other specs on each play.A sound played at a fixed volume and pitch.A sound whose volume and pitch are sampled from a range on each play.Plays nothing.Free-input slots backed by an ItemStack[] supplied by the menu handler at open time and persisted via the handler at close time.Thrown bySectionTypecodecs and the menu loader when a JSON definition fails validation.One-row horizontal slider.
ItemAppearancerecord instead.