TextComponent class
Constructors
TextComponent (String text , {Color ? color , bool ? bold , bool ? underlined , bool ? italic , bool ? strikethrough , bool ? obfuscated , TextClickEvent ? clickEvent , TextHoverEvent ? hoverEvent , String ? insertion })
In Minecraft text in the chat or as title is defined with JSON-data. objD makes the JSON part of it easier by utilizing the TextComponent Class:
TextComponent.blockNbt (Location location , {required String path , bool ? interpret , Color ? color , bool ? bold , bool ? underlined , bool ? italic , bool ? strikethrough , bool ? obfuscated , TextClickEvent ? clickEvent , TextHoverEvent ? hoverEvent , String ? insertion })
TextComponent.blockNbt
Location
a location of a block
path
the path as a String
interpret
bool if nbt should be interpreted as TextComponent(optional)
...same properties...
from TextComponent
TextComponent.customFont (String char , {Color ? color = Color.White , bool ? bold , bool ? underlined , bool ? italic , bool ? strikethrough , bool ? obfuscated , TextClickEvent ? clickEvent , TextHoverEvent ? hoverEvent , String ? insertion })
TextComponent.customFont
String
a Custom Font Character(\uHEX
) to insert in your text
...same properties...
from TextComponent
TextComponent.entityNbt (Entity entity , {required String path , bool ? interpret , Color ? color , bool ? bold , bool ? underlined , bool ? italic , bool ? strikethrough , bool ? obfuscated , TextClickEvent ? clickEvent , TextHoverEvent ? hoverEvent , String ? insertion })
TextComponent.entityNbt
Entity
the entity which has nbt to display
path
the path as a String
interpret
bool if nbt should be interpreted as TextComponent(optional)
...same properties...
from TextComponent
TextComponent.lineBreak ()
This inserts a simple line break
TextComponent.none ()
TextComponent.score (Score score , {Color ? color , bool ? bold , bool ? italic , bool ? underlined , bool ? strikethrough , bool ? obfuscated , TextClickEvent ? clickEvent , TextHoverEvent ? hoverEvent , String ? insertion })
TextComponent.score(
Entity.Selected(),
objective: 'myscores',
color:Color.Black
)
⇒ {'score':{'name': '@s','objective':'myscores'},'color':'black'}
TextComponent.selector (Entity entity , {Color ? color , bool ? bold , bool ? underlined , bool ? italic , bool ? strikethrough , bool ? obfuscated , TextClickEvent ? clickEvent , TextHoverEvent ? hoverEvent , String ? insertion })
TextComponent.space (int pixels , {Color ? color , bool ? bold , bool ? underlined , bool ? italic , bool ? strikethrough , bool ? obfuscated , TextClickEvent ? clickEvent , TextHoverEvent ? hoverEvent , String ? insertion })
Attention: This requires a custom negative spaces font by AmberW installed(https://cdn.discordapp.com/attachments/157097006500806656/486915349569208322/NegativeSpaceFont3.zip )
TextComponent.storageNbt (String name , {required String path , bool ? interpret , Color ? color , bool ? bold , bool ? underlined , bool ? italic , bool ? strikethrough , bool ? obfuscated , TextClickEvent ? clickEvent , TextHoverEvent ? hoverEvent , String ? insertion })
TextComponent.storageNbt
String
The name of your Storage(including namespace)
path
the path as a String
interpret
bool if nbt should be interpreted as TextComponent(optional)
...same properties...
from TextComponent
TextComponent.translate (String key , {List ? conversionFlags , Color ? color , bool ? bold , bool ? italic , bool ? underlined , bool ? strikethrough , bool ? obfuscated , TextClickEvent ? clickEvent , TextHoverEvent ? hoverEvent , String ? insertion , String ? fallback })