EssentialsX

EssentialsX

2M Downloads

more than 8 colors in /itemrename and colored items in kits not working (spigot)

4L0N50asd opened this issue · 4 comments

commented

Information

Full output of /ess version:

[00:28:49] [Server thread/INFO]: Server version: 1.16.1-R0.1-SNAPSHOT git-Spigot-0287a20-7560f5f (MC: 1.16.1)
[00:28:49] [Server thread/INFO]: EssentialsX version: 2.17.2.160
[00:28:49] [Server thread/INFO]: LuckPerms version: 5.1.26
[00:28:49] [Server thread/INFO]: PlaceholderAPI version: 2.10.6
[00:28:49] [Server thread/INFO]: Vault version: 1.7.2-b107
[00:28:49] [Server thread/INFO]: Citizens version: 2.0.27-SNAPSHOT (build 2019)
[00:28:49] [Server thread/INFO]: EssentialsXChat version: 2.17.2.160
[00:28:49] [Server thread/INFO]: EssentialsXSpawn version: 2.17.2.160

Server log: https://gist.github.com/4L0N50asd/50d0038cbb69b68a171b36f963befcf5

EssentialsX config: https://gist.github.com/4L0N50asd/7ffd8a57acfc77b45de73e458a4e0d15

Details

Description
When i try to put more than 8 colors in the /itemrename command it doesn't apply the command, it lets the default name of the Item and doesn't apply the colors. The same with the kits.yml, I have items with colored name (+8 colors) and it gives me the item but without the colored name (and lets the default name of the item).

Steps to reproduce

  1. Used command in-game /itemrename &4&lM&c&li&b&ln&3&le&9&lc&8&lr&7&laf&8&lt&9&le&3&lr&b&lh&c&lu&4&lf and found that I didn't have the item name colored (puts the default name of item)
  2. Tested if there's a limit of characters (tested until 245 characters)
  3. Tested if there's a issue with Bold &l, Italic &o, Obfuscated &k, Underlined &n, Strike &m, Reset &r
  4. Tested if there's a issue with combining some colors. &11&22&33&44&55&66&77&88&99&00
  5. Found that /itemrename &11&22&33&44&55&66&77&88 works (8 colors) but not more than 8 colors /itemrename &11&22&33&44&55&66&77&88&99....
  6. Now tested with the Kit.yml
  7. Used /kit huf where i have items as - stone_sword 1 name:&eEspadón_de_&4&lM&c&li&b&ln&3&le&9&lc&8&lr&7&la&7&lf&8&lt&9&le&3&lr&b&lh&c&lu&4&lf (kits.yml https://gist.github.com/4L0N50asd/01cbe6e1b01f7d2b40eb7428b2c42b19)
  8. The same, I have the item but there's not the color in that item and the custom name i set. Recieved the default name of item (lore and enchants still there, no issues)

Expected behavior
Expected the Item i wanted to have (what new users get)
Screenshot of EssentialsX 1.15.2:
/itemrename
image
Colored Item from the /kit huf
image

Screenshots
With EssentialsX-2.17.2.160 1.16.1:
Result from /itemrename
image

Result from /kit huf
image

commented

do you still have this issue on newer spigot builds?

I'm not sure if this is relevant, but I had a very similar issue independently in my own plugins when using ItemMeta.setDisplayName by itself. (And I had the issue with /itemrename at the time also, just to confirm I wasn't crazy.)
Some characteristics of the issue I had:

  • using a certain number of colors (I thought 7+ at the time, but maybe I miscounted) caused the item name to revert to minecraft default
  • this only happened when the colorcodes used would generate distinct components (combined formatting on a single piece of text only counted as 1)

this was directly after hex color support was added in spigot, and I haven't checked again if there still is an issue, but I'm using /itemrename now without issues - however I am on Paper-101 instead of Spigot, so I'm not sure where it was patched or which one patched it.

commented

Absolutely a thing on latest Paper build. Absolutely infuriating! Has to do with when reading from disc.

I got it after running /showkit but I doubt that matters. Happened with one color on firework.

Might have to do with rouge stringification.

commented

Hey! If you're able to reproduce this reliably on Paper, don't feel hesitant to report an issue over on https://github.com/PaperMC/Paper/issues. From what I see, I don't think it's been reported yet, we'll be happy to help get this fixed upstream.

commented

If issue still persists, it's likley an upstream issue, closing for now.