2

This question already has an answer here:

I'm playing on iOS, and I need some help with commands. I'm trying to give mobs that I spawn custom names. I have tried the following:

/summon villager ~ ~ ~ {CustomName:"Dr.Tray"}

The error message I got was "Invalid Command Syntax"

If you know the correct way to do this, Please do not hesitate to tell me!

marked as duplicate by Fabian Röling, Schism, Wondercricket, Virusbomb, arghtype Apr 29 at 17:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

The only data tags that work in Pocket Edition are CanPlaceOn and CanDestroy for items. To rename a mob, you have to use an item tag.

  • Thank you! Now I ask how do I use canplaceon and candestory? – DeathbotGaming Sep 15 '17 at 18:03
  • Look at the wiki. The comments aren't the place to answer a completely different question. – Fabian Röling Sep 15 '17 at 21:55
-1

So to use can place on and can destroy you could put /give @p [item] 1 0 {"can_destroy":{"blocks":["you’re chosen block"]}}

/give @p [block] 1 0 {"can_place_on":{"blocks":["you’re chosen blocks"]}}

And you can add more than one chosen block

Not the answer you're looking for? Browse other questions tagged or ask your own question.