2

So I've been trying to use this commands (on 1.8.8) that someone gave for ages! But when i try to put it in the command block it literally does nothing! Can someone tell me what is wrong? or fix the command if there's any errors?

The intended use of this commands is to detect players who tries to remove/throw iron sword (with the name Vladimir and lore Who names their sword that?!) in a specific slot and then it will quickly erase the sword then replace it. In summary it Locks an item in a specific slot.

This is the list of commands:

/clear @a[score_hotbarlock=0,score_inGame_min=1] iron_sword 0 64 {ench:[],display:{Name:"Vladimir",Lore:["Who names their sword that?!"]}}

replaceitem entity @a[score_hotbarlock=0,score_inGame_min=1] slot.hotbar.8 iron_sword 1 0 {ench:[],display:{Name:"Vladimir",Lore:["Who names their sword that?!"]}}

/execute @e[score_inGame_min=1,score_hotbarlock=0]~ ~ ~ scoreboard players set @e[typeItem,r=2] dropitem 1 {Item:{id:"iron_sword",tag:{ench:[],display:{Name:"Vladimir",Lore:["Who names their sword that?!"]}}}}

/kill @e[score_dropitem_min=1]

Any help would be appreciated

4
  • Are you saying you put them all into a single command block?
    – user114997
    Commented Aug 9, 2015 at 11:49
  • Are you powering the command blocks?
    – MBraedley
    Commented Aug 9, 2015 at 14:49
  • Also, have you set up the scoreboard objectives that you need?
    – MBraedley
    Commented Aug 9, 2015 at 14:50
  • I have set up the objectives, I put the commands in separate command blocks, the command blocks are constantly getting powered by a fill clock. Commented Aug 10, 2015 at 9:42

1 Answer 1

3

First make sure that the relevant objectives are set up:

/scoreboard objectives add hotbarlock dummy
/scoreboard objectives add inGame dummy
/scoreboard objectives add dropitem dummy

And that you have the correct scores:

/scoreboard players set @p hotbarlock 0
/scoreboard players set @p inGame 1

The first two commands should be fine, but there are a few errors with the third command:

  1. You have missed a space between the first selector and ~.

  2. You have written "typeItem" rather than "type=Item".

  3. You have not given the full item ID, which is "minecraft:iron_sword".

Correct the third command to:

execute @e[score_inGame_min=1,score_hotbarlock=0] ~ ~ ~ scoreboard players set @e[type=Item,r=2] dropitem 1 {Item:{id:"minecraft:iron_sword",tag:{ench:[],display:{Name:"Vladimir",Lore:["Who names their sword that?!"]}}}}

After setting up the objectives properly, and correcting the third command, the system should work.

1
  • Thanks dude, for listing the mistakes in the command! Really saved my time! :D Commented Aug 10, 2015 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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