feat: 新增聊天相关API

This commit is contained in:
coding
2018-05-13 16:13:32 +00:00
parent a041e8e2d2
commit 3df2625e65
3 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,8 @@
/*global Java, base, module, exports, require*/
function json(sender, json) {
}
exports = module.exports = {
json: json
};

View File

@ -0,0 +1,9 @@
/*global Java, base, module, exports, require*/
var TextSerializers = Java.type('org.spongepowered.api.text.serializer.TextSerializers');
function json(sender, json) {
sender.sendMessage(TextSerializers.JSON.deserialize(json));
}
exports = module.exports = {
json: json
};