Releases: egorprnn/RawJSONBuilder
Releases · egorprnn/RawJSONBuilder
2.1.1
2.1.0
2.0.2
2.0.1
2.0.0
🌟Highlights
Now all the components are in separate classes.
Each component has its own factory function for quickly creating a component.
Example:
import { text, TextComponent } from "rawjsonbuilder"; // ESM
// OR
const { text, TextComponent } = require("rawjsonbuilder"); // CommonJS
text("Hello World!", "black")
.toRawString(); // §0Hello World!
const builder = new TextComponent()
.setText("Hello World!")
.setBold()
.addSpace()
.addExtra(
text("Nice to meet you!", "red")
)
.toRawString(); // §lHello World! §cNice to meet you!
All available classes & methods can be viewed in the docs.
🚀 Features
- Class components:
TextComponent
,NBTComponent
,TranslateComponent
,ScoreComponent
,SelectorComponent
,KeybindComponent
. - Enums:
Component
,ColorCode
,Markdown
.
⚠️ BREAKING CHANGES
RawJSONBuilder
class was removed.