
1、檢測手持物品:/testfor 玩家 {SelectedItem:{id,Count,Damage,tag}}
2、id為需要檢測手持的物品ID。Count為需要檢測手持的物品的數量,若填,則只有符合數量時會檢測到;若不填,則任意數量均可。Damage為需要檢測手持的物品的附加值,選填,效果同上。tag為需要檢測手持的物品的NBT,只支持檢測display。

1、檢測手持物品:/testfor 玩家 {SelectedItem:{id,Count,Damage,tag}}
2、id為需要檢測手持的物品ID。Count為需要檢測手持的物品的數量,若填,則只有符合數量時會檢測到;若不填,則任意數量均可。Damage為需要檢測手持的物品的附加值,選填,效果同上。tag為需要檢測手持的物品的NBT,只支持檢測display。