java.lang.Object
io.github.projectunified.unidialog.packetevents.body.PEItemBody
All Implemented Interfaces:
ItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,PETextBody,PEItemBody>, PEDialogBody

public class PEItemBody extends Object implements ItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,PETextBody,PEItemBody>, PEDialogBody
  • Constructor Details

    • PEItemBody

      public PEItemBody(Function<String,net.kyori.adventure.text.Component> componentDeserializer)
  • Method Details

    • item

      public PEItemBody item(com.github.retrooper.packetevents.protocol.item.ItemStack item)
      Description copied from interface: ItemBody
      Set the item for the body
      Specified by:
      item in interface ItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,PETextBody,PEItemBody>
      Parameters:
      item - the item to set
      Returns:
      the instance of the item body for method chaining
    • description

      public PEItemBody description(@Nullable @Nullable Consumer<PETextBody> descriptionBuilder)
      Description copied from interface: ItemBody
      Set the description for the body
      Specified by:
      description in interface ItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,PETextBody,PEItemBody>
      Parameters:
      descriptionBuilder - a consumer to build the description
      Returns:
      the instance of the item body for method chaining
    • showDecorations

      public PEItemBody showDecorations(boolean showDecorations)
      Description copied from interface: ItemBody
      Set the option to show decorations in the body
      Specified by:
      showDecorations in interface ItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,PETextBody,PEItemBody>
      Parameters:
      showDecorations - whether to show decorations
      Returns:
      the instance of the item body for method chaining
    • showTooltip

      public PEItemBody showTooltip(boolean showTooltip)
      Description copied from interface: ItemBody
      Set the option to show a tooltip in the body
      Specified by:
      showTooltip in interface ItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,PETextBody,PEItemBody>
      Parameters:
      showTooltip - whether to show a tooltip
      Returns:
      the instance of the item body for method chaining
    • width

      public PEItemBody width(int width)
      Description copied from interface: ItemBody
      Set the width of the item body
      Specified by:
      width in interface ItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,PETextBody,PEItemBody>
      Parameters:
      width - the width to set
      Returns:
      the instance of the item body for method chaining
    • height

      public PEItemBody height(int height)
      Description copied from interface: ItemBody
      Set the height of the item body
      Specified by:
      height in interface ItemBody<com.github.retrooper.packetevents.protocol.item.ItemStack,PETextBody,PEItemBody>
      Parameters:
      height - the height to set
      Returns:
      the instance of the item body for method chaining
    • getDialogBody

      public com.github.retrooper.packetevents.protocol.dialog.body.DialogBody getDialogBody()
      Specified by:
      getDialogBody in interface PEDialogBody