Interface Title

All Known Implementing Classes:
ConstantTitle
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Title
Represents the title of a SpectatorInventoryView. The title string is computed from a Target.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Title
    Get the default ender chest spectator inventory title: "<target>'s enderchest"
    static Title
    Get the default main spectator inventory title: "<target>'s inventory"
    static Title
    of(String title)
    Create a title with a constant tile string.
    static Title
    of(Function<? super Target, ? extends String> function)
    Convert a Function into a Title.
    titleFor(Target target)
    Get the title string for a given Target.
  • Method Details

    • titleFor

      String titleFor(Target target)
      Get the title string for a given Target.
      Parameters:
      target - the target
      Returns:
      the title string
    • of

      static Title of(String title)
      Create a title with a constant tile string.
      Parameters:
      title - the constant title string
      Returns:
      the Title
    • of

      static Title of(Function<? super Target, ? extends String> function)
      Convert a Function into a Title.
    • defaultMainInventory

      static Title defaultMainInventory()
      Get the default main spectator inventory title: "<target>'s inventory"
    • defaultEnderInventory

      static Title defaultEnderInventory()
      Get the default ender chest spectator inventory title: "<target>'s enderchest"