CS3 中文Wiki
  • Custom Stuff 3
  • 事件函数
  • 物品类函数
    • onArmorUpdate
    • onBlockDestroyed
    • onBlockStartBreak
    • onCreated
    • onDroppedByPlayer
    • onEaten
    • onHitEntity
    • onLeftClickLiving
    • onLeftClickPlayer
    • onRightClick
    • onStoppedUsing
    • onUpdate
    • onUse
    • onUseFirst
    • onUseOnEntity
    • onUseOnPlayer
    • onUsing
  • Untitled
  • 方块类函数
由 GitBook 提供支持
在本页

这有帮助吗?

  1. 物品类函数

onRightClick

右键时

判断条件: 右键此物时 检测时间: 右键后

函数效果:当右键此物时可使用 itemstack || player || world 类方法

player.sendMessage(itemstack.hasEnchantment(17))
//返回此物时候拥有 亡灵杀手 附魔 (布尔值)
player.attack(5)
//自残五点生命值 (满值20)
world.sendMessageToAllPlayers("哇偶")
//向所有人说句话
上一页onLeftClickPlayer下一页onStoppedUsing

最后更新于4年前

这有帮助吗?