EffectiveScreenText

Plain white text placed anywhere on a player's screen ⚠️ Experimental. See EffectiveScreenImage — same caveats. (see EffectiveScreenElement). The shader shifts the whole string, keeping its layout, so that its centre lands at x/y. scale multiplies the size the text would have in its transport (a title is 4× GUI text), quantized to 1/8 in 0.125..4.0. Blue 128..159 is reserved. Text is always white and unshadowed.

EffectiveScreenText.show(player, "Wave 3", x = 0.5f, y = 0.1f, scale = 2f)
EffectiveScreenText.show(player, "Go!", x = 0.5f, y = 0.5f, scale = 4f, durationTicks = 40)
EffectiveScreenText.hide(player)

Same requirements as EffectiveScreenImage: the plugin's resource pack must be enabled, one element per player via the title slot, and shader packs ignore the placement.

Functions

Link copied to clipboard
fun getComponent(text: String, x: Float, y: Float, scale: Float = 1.0f): Component

text with the placement encoded in its color; put it in a title, action bar, boss bar, …

Link copied to clipboard
fun hide(player: Player)

Hides whatever this element showed via a title.

Link copied to clipboard
open fun isPersistent(player: Player): Boolean

Whether the element stays on player's screen permanently (re-shown automatically on join/respawn/world change).

Link copied to clipboard
fun show(player: Player, text: String, x: Float, y: Float, scale: Float = 1.0f, durationTicks: Int = FOREVER_TICKS)

Shows text to player centred at x/y for durationTicks.