onBlockStartBreak

方块破坏前检测

判断条件: 破坏方块时 检测时间: 破坏方块前

函数效果:当破坏方块时可使用 itemstack || player || position || world 类方法

itemstack.addEnchantment(1,1)
//附魔 火焰保护 I
player.sendChat("/me is so Good")
//以玩家身份执行命令
player.sendMessage(position.x + " " + position.y + " " + position.z)
//获取方块被破坏时的坐标 (z轴会偏移1~2格#大概是取整问题)
player.sendMessage(world.getTime())
//获取当前时间 (以tick为单位 获取游戏tick总和)

最后更新于

这有帮助吗?