[SPIGOT-6010] Item lores no longer being displayed Created: 19/Jul/20  Updated: 24/Apr/24  Resolved: 24/Apr/24

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

Type: Bug Priority: Minor
Reporter: Pyves Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.16.1
Environment:

Version: git-Spigot-d4cbb64-2361cb8 (MC: 1.16.1)
Guidelines Read: Yes

 Description   

Consider the following piece of code to create an item lore in an inventory:

Inventory inventory = Bukkit.createInventory(null, 18, "some title");
ItemStack item = new ItemStack(Material.ACACIA_WOOD);
ItemMeta itemMeta = item.getItemMeta();
itemMeta.setLore(Arrays.asList("§8[§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8| §8§o0/100 §8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5|§8|§5]"));
item.setItemMeta(itemMeta);
inventory.setItem(0, item);
((Player) event.getWhoClicked()).openInventory(inventory);

The lore may seem like a somewhat contrived example, but illustrates the kind of progress bar that are displayed by the Advanced Achievements plugin.

The above code works fine with Spigot 1.15 and any version going back to at least 1.7, but no longer works with version 1.16: the lore is not displayed at all anymore.

Is this a problem with Spigot, or is it a new client-side limitation?

Thanks for reading.



 Comments   
Comment by Marvin Rieple [ 24/Apr/24 ]

Can reproduce in 1.20.4, can no longer reproduce in 1.20.5.
In 1.20.5 the limits where removed, see: b698b49caf1

Comment by blablubbabc [ 20/Jul/20 ]

@md_5 You seem to have missed increasing the limit for lore lines: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/browse/CraftBukkit-Patches/0070-Better-item-validation.patch#98

It's still at the original 8192, the JSON text of this lore has a length of 8441

Comment by Pyves [ 20/Jul/20 ]

I've updated from git-Spigot-d4cbb64-2361cb8 (MC: 1.16.1) to git-Spigot-0509002-6b95d59 (MC: 1.16.1). Unfortunately the issue still seems to be present.

Comment by md_5 [ 20/Jul/20 ]

Please update, the length limits were increased quite significantly yesterday

Generated at Tue Apr 15 09:41:39 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.