mojira.dev
MC-175074

/execute @a repeating command block only targeting specific players (on Java 1.15.2 server)

Hello all, i am currently experiencing a bug in minecraft 1.15.2 on my server. On my server there are a lot of repeating (always active) command blocks. now heres the issue: certain command blocks dont work and others only work on specific people even though the commands are @a.

Here is one of the commands that dont work at all:
/execute as @a[nbt={Inventory:[{Slot:103b,id:"minecraft:skeleton_skull",tag:{display:{Name:"{\"text\":\"Skeletal helmet\",\"color\":\"dark_gray\",\"italic\":\"false\",\"bold\":\"true\"}"}}}]}] run effect give @s minecraft:night_vision 30 1 true

There are a few more like this one in the spawn chunk for fun items to earn and play around with.

Here is a command that only works on 1 specific player, although multiple players are wearing the armorpiece:

/execute as @a[nbt={Inventory:[{Slot:100b,id:"minecraft:golden_boots",tag:{display:{Name:"{\"text\":\"Holy Jumpers\",\"color\":\"gold\",\"italic\":\"false\",\"bold\":\"true\"}"}}}]}] run effect give @s jump_boost 1 1 true

All items owned by players are named correctly of course.

Furthermore there are no plugins or mods on this server. Vanilla 1.15.2

I honestly dont know if you can replicate this bug, but i sure hope that there is a fix.

Comments 1

Both commands are formatted correctly, if all the colors, italics, etc. in-game are what they seem to be here. To shorten your commands (and potentially solve the error), give the items a tag, like so, for easier identification:

For the helmet:

/give <players> minecraft:skeleton_skull*{Tags:["skeletonHelmet"]*,display:{Name:"{\"text\":\"Skeletal helmet\",\"color\":\"dark_gray\",\"italic\":\"false\",\"bold\":\"true\"}"}}

/execute as @a[nbt={Inventory:[{Slot:103b,id:"minecraft:skeleton_skull",tag:{Tags:["skeletonHelmet"]}}]}] run effect give @s night_vision 30 1 true

For the boots:

/give <players> minecraft:golden_boots*{Tags:["superBoots"]*,display:{Name:"{\"text\":\"HolyJumpers\",\"color\":\"gold\",\"italic\":\"false\",\"bold\":\"true\"}"}}

/execute as @a[nbt={Inventory:[{Slot:100b,id:"minecraft:golden_boots",tag:{Tags:["superBoots"]}}]}] run effect give @s jump_boost 1 1 true

 

 

Just to be extra clear, your commands (respectively) are saying:

Give all players with a specific skeleton skull in their helmet slot 30 seconds of night vision.

Give all players with specific boots in their boots slot 1 seconds of jump boost.

 

Hope this cleared up any confusion. If not, try going to r/minecraftcommands for help or do some research on /execute.

*note: an overload of constantly running commands (especially with other people online) isn't good for any world, and may be causing the issue

Pepijn Gaulard

(Unassigned)

Unconfirmed

(Unassigned)

1.15.2

Retrieved