• 周年纪念勋章活动已圆满结束,如有已购买但仍未申请的用户,可以通过对应勋章的下载链接申请~
资源图标

资源 LSE-Offhand 主副手切换 v0.0.2

啦啦啦~
JavaScript:
mc.listen('onServerStarted', () => {
    const cmd = mc.newCommand('offhand', '主副手切换', PermType.Any);
    cmd.overload([]);
    cmd.setCallback((_, origin, output) => {
        if (!origin.player) return output.error('此命令仅玩家可使用!');
        const player = origin.player, itemBak = player.getHand().clone();
        player.getHand().set(player.getOffHand());
        player.getOffHand().set(itemBak);
        output.success('§6已切换。');
    });
    if (!cmd.setup()) logger.error('命令注册失败!');
});
 
佬,这个主副手切换,会导致被切换到副手的物品附魔消失,可以修复一下吗?
 
啦啦啦~
JavaScript:
mc.listen('onServerStarted', () => {
    const cmd = mc.newCommand('offhand', '主副手切换', PermType.Any);
    cmd.overload([]);
    cmd.setCallback((_, origin, output) => {
        if (!origin.player) return output.error('此命令仅玩家可使用!');
        const player = origin.player, itemBak = player.getHand().clone();
        player.getHand().set(player.getOffHand());
        player.getOffHand().set(itemBak);
        output.success('§6已切换。');
    });
    if (!cmd.setup()) logger.error('命令注册失败!');
});
qwq 没看到这个api 研究了半天指令
 
啦啦啦~
JavaScript:
mc.listen('onServerStarted', () => {
    const cmd = mc.newCommand('offhand', '主副手切换', PermType.Any);
    cmd.overload([]);
    cmd.setCallback((_, origin, output) => {
        if (!origin.player) return output.error('此命令仅玩家可使用!');
        const player = origin.player, itemBak = player.getHand().clone();
        player.getHand().set(player.getOffHand());
        player.getOffHand().set(itemBak);
        output.success('§6已切换。');
    });
    if (!cmd.setup()) logger.error('命令注册失败!');
});
不对啊 你这个好像有问题
 
大佬我是新手,教我怎么导入进那个国基岩版。
 

在线管理成员

在线会员

  • 2871275669
  • 648645654465456
  • ZTDYY
  • ljys1216
  • hzm100828
  • 卡卡豆
  • hanandy
  • Tighnari
  • 星涵 OwO
  • XiaoDou_
  • 汽水味橘孑
  • CHL_chun
  • y1668445919
  • 3469834768
  • PuddingKC
  • fjghaw
  • zeh20120327@outlook.
  • muxiaojin
  • YSYERROR
  • bzdqsm114514
  • YYT
  • polang
...和 74 更多。
后退
顶部 底部