偵測玩家是否擁有物品
例子:
更多例子:
偵測玩家身上有沒有鐵劍clear指令清除0個道具時,會偵測玩家身上是否有該道具,接比較器就能得到訊號
/clear @p minecraft:iron_sword 0 0
測試玩家有沒有hello_sword這個道具
給玩家此道具(詳見自定義道具)
/give @p minecraft:iron_sword 1 0 {display:{Name:"hello_sword"}}
測試
/clear @p minecraft:iron_sword 0 0 {display:{Name:"hello_sword"}}
留言
張貼留言