Interface TextScreenRender


public interface TextScreenRender
Renders text display entities attached to players with animations and effects.

Usage example:

TextScreenRender render = flectonePulse.get(TextScreenRender.class);

TextScreen textScreen = new TextScreen(
    5, // live time in seconds
    0.5f, // scale
    100, // width
    true, // shadow
    "#FF0000", // background color
    true, // see through
    0, 1, 0, // offset
    true, 10 // animation enabled, 10 ticks
);

render.render(player, Component.text("Hello!"), textScreen);
Since:
1.7.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears all active text screen entities for all players.
    Gets all text screen entity IDs attached to a player.
    void
    render(FPlayer fPlayer, net.kyori.adventure.text.Component message, TextScreen textScreen)
    Renders a text screen entity attached to a player.
    void
    ride(UUID uuid, int playerId, List<Integer> textScreenPassengers, boolean silent)
    Attaches text screen entities to a player as passengers.
    void
    updateAndRide(int playerId)
    Updates passenger list for a player asynchronously.
  • Method Details

    • clear

      void clear()
      Clears all active text screen entities for all players.
    • render

      void render(FPlayer fPlayer, net.kyori.adventure.text.Component message, TextScreen textScreen)
      Renders a text screen entity attached to a player.
      Parameters:
      fPlayer - the player to attach the text screen to
      message - the text component to display
      textScreen - the text screen configuration
    • getPassengers

      List<Integer> getPassengers(UUID uuid)
      Gets all text screen entity IDs attached to a player.
      Parameters:
      uuid - the player's UUID
      Returns:
      list of entity IDs, empty if none
    • ride

      void ride(UUID uuid, int playerId, List<Integer> textScreenPassengers, boolean silent)
      Attaches text screen entities to a player as passengers.
      Parameters:
      uuid - the player's UUID
      playerId - the player's entity ID
      textScreenPassengers - list of text screen entity IDs
      silent - whether to send the packet silently
    • updateAndRide

      void updateAndRide(int playerId)
      Updates passenger list for a player asynchronously.
      Parameters:
      playerId - the player's entity ID