Interface RenderContext

All Superinterfaces:
ViewContext
All Known Implementing Classes:
RenderContextImpl

@NonExtendable public interface RenderContext extends ViewContext
Context for View.onFirstRender: declares this session's components. Declaration order is paint order. Main thread, engine-invoked, once per open.
  • Method Details

    • slot

      @NotNull @NotNull ItemComponentBuilder slot(int slot)
      Starts a component bound to a single slot.
      Parameters:
      slot - the 0-based raw slot, less than rows * 9
      Returns:
      the component builder for fluent configuration
    • slot

      @NotNull @NotNull ItemComponentBuilder slot(int row, int column)
      Starts a component bound to a single slot addressed by grid position.
      Parameters:
      row - the 1-based row, 1 to 6
      column - the 1-based column, 1 to 9
      Returns:
      the component builder
    • slot

      @NotNull @NotNull ItemComponentBuilder slot(int slot, @NotNull @NotNull org.bukkit.inventory.ItemStack item)
      Starts a single-slot component with a static item already set.
      Parameters:
      slot - the 0-based raw slot
      item - the static item to display
      Returns:
      the component builder
    • layoutSlot

      @NotNull @NotNull ItemComponentBuilder layoutSlot(char character)
      Starts one component applied to every slot bound to the given layout character.
      Parameters:
      character - a character present in the configured layout
      Returns:
      the component builder
    • layoutSlot

      @NotNull @NotNull ItemComponentBuilder layoutSlot(char character, @NotNull @NotNull org.bukkit.inventory.ItemStack item)
      Starts a layout-character component with a static item already set.
      Parameters:
      character - a character present in the configured layout
      item - the static item displayed on every bound slot
      Returns:
      the component builder