feat: add tellraw string
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
f869a524ff
commit
30ec92fd65
@ -88,7 +88,7 @@ class Tellraw {
|
||||
json() {
|
||||
if (!this.cache) {
|
||||
var temp = [];
|
||||
this.parts.forEach(function(t) {
|
||||
this.parts.forEach(t => {
|
||||
temp.push(t.convert());
|
||||
});
|
||||
this.cache = JSON.stringify(temp);
|
||||
@ -96,6 +96,14 @@ class Tellraw {
|
||||
}
|
||||
return this.cache;
|
||||
}
|
||||
|
||||
string() {
|
||||
var temp = '';
|
||||
this.parts.forEach(t => {
|
||||
temp += t.text
|
||||
});
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
|
||||
export default Tellraw
|
||||
|
Loading…
Reference in New Issue
Block a user