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

  • Are you saying you put them all into a single command block? – nine Aug 9 '15 at 11:49
  • Are you powering the command blocks? – MBraedley Aug 9 '15 at 14:49
  • Also, have you set up the scoreboard objectives that you need? – MBraedley Aug 9 '15 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. – Anon360NOSCOPES Aug 10 '15 at 9:42
2

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.

  • Thanks dude, for listing the mistakes in the command! Really saved my time! :D – Anon360NOSCOPES Aug 10 '15 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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