[SPIGOT-5304] Changing NBT data by opening your inventory Created: 03/Sep/19  Updated: 04/Sep/19  Resolved: 04/Sep/19

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: taku Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: inventory, nbt, nbtdata
Environment:

Win 10;

Java 1.8.0_51 64bit

 


Issue Links:
Duplicate
duplicates SPIGOT-5063 Deserialized items with colored names... Resolved
Version: git-Spigot-9de398a-9c887d4 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
Plugin: -
Guidelines Read: Yes

 Description   

To reproduce:

setup repeating, always-active command block with:

/execute at @a[nbt=\{SelectedItem:{id:"minecraft:stick",tag:{display:{Name:"\"black\""}}}}] run particle minecraft:squid_ink ~ ~ ~ 1 1 1 1 3000 force

(the particles are just visuals, every command works)

then give yourself this stick:

/give @p minecraft:stick{display:{Name:"\"black\""}} 1

and select it in your hotbar

 

your vision will go black which is fine but then press E to open your inventory and you'll see the particles disappear. As soon as you open your inventory the stick nbt data seems to be changed, affecting the name of the item. Not visually but technically which is why the command then fails.

Does not happen in vanilla or different plugin configurations.

Does happen in the newest versions of spigot aswell


Generated at Fri Mar 14 09:44:38 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.