【Lv:1】
//快速回血
{
mc.listen("onAte", (pl, it) => {
let g = peizhi.get("快速回血");
if (
(g["开关"] == "开" && it.type != "minecraft:pufferfish") ||
it.type != "potion"
) {
let id = setInterval(() => {
if (pl.health != pl.maxHealth && pl.inWorld == 1) {
pl.heal(1);
} else {
clearInterval(id);
}
}, 500);
}
});
}
当时随便写的所以不完善很长时间没更新了JavaScript://快速回血 { mc.listen("onAte", (pl, it) => { let g = peizhi.get("快速回血"); if ( (g["开关"] == "开" && it.type != "minecraft:pufferfish") || it.type != "potion" ) { let id = setInterval(() => { if (pl.health != pl.maxHealth && pl.inWorld == 1) { pl.heal(1); } else { clearInterval(id); } }, 500); } }); }
您好,这个快速回血的代码是不是有点毛病,只要不是药水,设置与否都会回血