Mojira Archive
MCM-521

/replaceitem does not take selector arguments into account when replacing items in the offhand slot

Partner Rank:

2

Partner Team Reporting:

Polymaps

Verification builds and Platforms:

Occurs in 1.8, 1.9 and 1.10

Summary:

Using /replaceitem to replace an item in the offhand of a player will replace the item for all players even if the target selector arguments would prevent certain players from being targeted.

Impact:

This bug, in particular, affects Cobble Clicker Skyblock, which is one of our best-selling and most-recent maps. Any time the map is played with multiple players, it is possible for players to duplicate totems of undying, which is obviously a problem in a survival map.

Repro Steps:

  1. Create a new world
  2. Have a second player (or more) join either via LAN or a direct connect.
  3. Run this command from one of the players. 
    /replaceitem entity @s slot.weapon.offhand 0 arrow
    

Observed Results:

All players will be given the arrow in their offhand.

Expected Results:

Only those specified in the target selector should be given the item in the offhand. (In the case of the command above, only the person running the command).

Screenshots/Videos attached: Yes/No

Here is a video demonstrating the bug in action: https://www.youtube.com/watch?v=Cm6pZWeQyGY

Regression Builds:

I could not find a build where this bug did not occur, so it could be that it has always existed.

Notes:

This problem seems to only occur when targeting the offhand slot!

Fixed

samasaurus6

2019-01-28, 02:46 PM

2019-02-22, 10:37 PM

2019-02-22, 10:37 PM

0

1

Future Release

-