Class Toast.Builder

java.lang.Object
com.github.darksoulq.abyssallib.world.advancement.Toast.Builder
Enclosing class:
Toast

public static class Toast.Builder extends Object
A fluent builder for creating Toast notifications.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • titlle

      public Toast.Builder titlle(net.kyori.adventure.text.Component line1)
      Sets the first line of text.
      Parameters:
      line1 - Primary header.
      Returns:
      This builder.
    • subtitle

      public Toast.Builder subtitle(net.kyori.adventure.text.Component line2)
      Sets the second line of text.
      Parameters:
      line2 - Sub-header.
      Returns:
      This builder.
    • icon

      public Toast.Builder icon(org.bukkit.inventory.ItemStack icon)
      Sets the icon for the toast.
      Parameters:
      icon - The ItemStack icon.
      Returns:
      This builder.
    • frame

      public Toast.Builder frame(AdvancementFrame frame)
      Sets the frame border style.
      Parameters:
      frame - Visual frame.
      Returns:
      This builder.
    • build

      public Toast build()
      Finalizes the construction of the Toast.
      Returns:
      A new Toast instance.