GuiPage constructor

GuiPage(
  1. List<GuiSlot> slots, {
  2. Item? placeholder,
  3. bool fillEmptySlots = false,
})

Your guis can be seperated in multiple pages. The pages can be switched and display different content or have different functionality. So for each page the entire Gui is built again.

GuiModule.chest(
		Location('-49 56 -36')
		pages: [
			GuiPage(
				[
					...
				],
				fillEmptySlots: true,
				placeholder: Item(Items.gray_stained_glass_pane)
			)
		]
)

Each Page requires a list of GuiSlots, that should be placed in the current Gui. With the fillEmptySlots option you can toggle, whether the slots that are not specified should be filled and blocked with either the placeholder provided by the page itself or if not available by the placeholder of the GuiModule.

Implementation

GuiPage(
  this.slots, {
  this.placeholder,
  this.fillEmptySlots = false,
});