2

I want to set a Command Block that is hidden so when the player activates it by a button it'll give them an enchanted item based off their input. (the first part of a greater system)

so far I can use /give @p iron_sword 1 0 {ench:[{id:16,lvl:10}]} to give an Iron Sword with a Level 10 Sharpness Enchantment.

What I want to do is alter the above command so iron_sword, 16 and 10 can be inputted by the player (who will have a guide), so when the player activates the command block from a button they'll be asked to input these values. however when I google search minecraft command block player input i'm either getting "player input" as in the interface of the command block you create the commands or using /testfor

So how can I alter the command above so the player is asked to input the values?

NOTE: this is for 1.7.10

2
  • This can be done with /trigger in 1.8, or any 1.8 snapshot after and including 14w06a
    – Moddl
    Commented Apr 23, 2015 at 23:41
  • I think there is a way, but it would be 1.8 only. Commented Apr 24, 2015 at 23:13

1 Answer 1

-1

An exemple of trigger use:

scoreboard objectives add question trigger
scoreboard players enable @a question
/tellraw @a ["",{"text":"Do you think it will help you ? ","color":"gold","bold":"true"},{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/trigger question set 1"}},{"text":" ","color":"none","bold":"false"},{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/trigger question set 2"}}]
execute @a[score_question=1] ~ ~ ~ tell @p You answered Yes
execute @a[score_question_min=2] ~ ~ ~ tell @p You answered No
1
  • 3
    OP said he's using 1.7.10.
    – MadMrCrazy
    Commented Nov 9, 2015 at 6:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .