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 TypeMethodDescriptionvoidclear()Clears all active text screen entities for all players.getPassengers(UUID uuid) Gets all text screen entity IDs attached to a player.voidrender(FPlayer fPlayer, net.kyori.adventure.text.Component message, TextScreen textScreen) Renders a text screen entity attached to a player.voidAttaches text screen entities to a player as passengers.voidupdateAndRide(int playerId) Updates passenger list for a player asynchronously.
-
Method Details
-
clear
void clear()Clears all active text screen entities for all players. -
render
Renders a text screen entity attached to a player.- Parameters:
fPlayer- the player to attach the text screen tomessage- the text component to displaytextScreen- the text screen configuration
-
getPassengers
-
ride
Attaches text screen entities to a player as passengers.- Parameters:
uuid- the player's UUIDplayerId- the player's entity IDtextScreenPassengers- list of text screen entity IDssilent- 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
-