x
  • IP Copied!
    Click to Copy IP
    0 Players Online
  • Join our Discord!
    0 Users Online
  • I need some command block help with a MC map ...

    Discussion in 'Off-Topic' started by Robo, Apr 24, 2017.

    1. Robo
      Offline

      Robo Boss Member

      Joined:
      Jan 5, 2016
      Messages:
      845
      Likes Received:
      216
      Last edited: Apr 24, 2017
    2. Ares_Xena
      Offline

      Ares_Xena Legendary Member

      Joined:
      Jan 25, 2014
      Messages:
      4,091
      Likes Received:
      1,660
      Are you talking about the SerialKey plugin? Purty sure you can download that off of Bukkit or find similar versions of it on Spigot.
       
    3. Robo
      Offline

      Robo Boss Member

      Joined:
      Jan 5, 2016
      Messages:
      845
      Likes Received:
      216
    4. Mega_
      Offline

      Mega_ Legendary Member

      Joined:
      Aug 1, 2014
      Messages:
      2,911
      Likes Received:
      695
      Just use a plugin. It will be easier to customise and you won't need to place a command block anywhere.
       
    5. Robo
      Offline

      Robo Boss Member

      Joined:
      Jan 5, 2016
      Messages:
      845
      Likes Received:
      216
      This is in a singleplayer world i cant get the plugin
       
    6. Watermelonone
      Offline

      Watermelonone Boss Member

      Joined:
      May 6, 2014
      Messages:
      613
      Likes Received:
      77
      No one is going to tell you if you call them "nerdy"
       
    7. AGuyWithAHat
      Offline

      AGuyWithAHat Active Member

      Joined:
      Mar 29, 2017
      Messages:
      8
      Likes Received:
      0
      I can help, well it'd be easier if you just used a hopper to use the key and only one specific item will be able to open the door, i can do that
       
    8. sircorgi
      Offline

      sircorgi Boss Member

      Joined:
      Nov 28, 2014
      Messages:
      5,642
      Likes Received:
      2,398
      little things make a big difference. People will think a map creator really put in effort if the players had to right click the door with a key instead of throwing it. It just makes the map more realistic.
      --
      Anyhoo, I just simplified (I tried my best) what the best answer was.

      1. First of all, type the command below and replace X Y Z with the co-ordinates of the bottom block/part of your door (As we all know, doors are two blocks high, get the coords of the bottom one)
      • /summon ArmorStand X Y Z {CustomName:"keyDetector",Invisible:1,Invulnerable:1}
      2. What you need to do next is place a command block, and set it to "repeating" (The purple command block). Set it to "Always Active" and put down the command below
      • /scoreboard players tag @a add hasKey {Inventory:[{tag:{display:{Name:"Key"}}}]
      3. Then, place another one and set that as a "chain" command block (green one). Make sure to set it as "Always Active" as well. Put down the command below:
      • /execute @a[tag=hasKey] ~ ~ ~ /execute @e[name=keyDetector,type=ArmorStand] ~ ~ ~ /setblock ~ ~ ~ iron_door 4
      4. Do the same from step 3 but this time, put this command below:
      • /execute @a[tag=hasKey] ~ ~ ~ /execute @e[name=keyDetector,type=ArmorStand] ~ ~ ~ /setblock ~ ~1 ~ iron_door 9
      Make sure the command blocks look like this
      [​IMG]



      if this doesn't work then it might be the numbers at the end of the two last commands. (4 on the second one, 9 on the last one)
       
    9. Robo
      Offline

      Robo Boss Member

      Joined:
      Jan 5, 2016
      Messages:
      845
      Likes Received:
      216
      Thanks a lot! I will try it and reply back if it worked. Thanks again!
       

    Share This Page