Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java spigot string to kyori textcomponent

// Creates a line of text saying "You're a Bunny! Press <key> to jump!", with some colouring and styling.
final TextComponent textComponent = Component.text("You're a ")
  .color(TextColor.color(0x443344))
  .append(Component.text("Bunny", NamedTextColor.LIGHT_PURPLE))
  .append(Component.text("! Press "))
  .append(
    Component.keybind("key.jump")
      .color(NamedTextColor.LIGHT_PURPLE)
      .decoration(TextDecoration.BOLD, true)
  )
  .append(Component.text(" to jump!"));
// now you can send `textComponent` to something, such as a client
Source by docs.adventure.kyori.net #
 
PREVIOUS NEXT
Tagged: #java #spigot #string #kyori #textcomponent
ADD COMMENT
Topic
Name
5+8 =