Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask for help #28

Open
cyear opened this issue Feb 5, 2022 · 1 comment
Open

Ask for help #28

cyear opened this issue Feb 5, 2022 · 1 comment

Comments

@cyear
Copy link

cyear commented Feb 5, 2022

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
Copy link

中文可以吗?
首先我不懂subscription destruction box 是什么逼,
然后gt小fw系统没有node support,不能http或fs。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants