Ask for help
Opened this issue · 1 comments
cyear commented
How to write the subscription destruction box and how to do HTTP get
import {Commands, World} from 'mojang-minecraft';
/*
执行指令
/*————*/
const log = function(msg) {
Commands.run(`tellraw @a {"rawtext":[{"text":"${msg}"}]}`, World.getDimension('overworld'));
}
World.events.BlockBreakEvent.subscribe((event) => {
/*
订阅玩家破坏方块消息
*/
blocks(event);
})
function blocks(event) {
var blocktype = event.block.id;//方块类型
var playername = event.player.name;//玩家名称
log(`${playername} 破坏 ${blocktype}`);
}
Mantou1233 commented
中文可以吗?
首先我不懂subscription destruction box 是什么逼,
然后gt小fw系统没有node support,不能http或fs。