2024-07-06 11:02:11 -04:00
|
|
|
const {processNbtMessage} = require("prismarine-chat");
|
|
|
|
const parse=function(data){
|
|
|
|
if(typeof data.type=="string"){
|
|
|
|
return JSON.parse(processNbtMessage(data));
|
2024-07-16 12:52:35 -04:00
|
|
|
} else if(typeof data=="string"){
|
|
|
|
return JSON.parse(data);
|
2024-07-06 11:02:11 -04:00
|
|
|
} else {
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = parse
|