MobArena icon indicating copy to clipboard operation
MobArena copied to clipboard

Sign text length doesn't account for color/formatting codes

Open EpicKnarvik97 opened this issue 10 months ago • 0 comments

Bug report

Short description

When I use the default text of 'players to join' for the idle sign's fourth line, the sign displays correctly. When I add a color code so it becomes: '&fplayers to join', the last two letters in join are cut off, even though the displayed text will have the same length, and should not overflow the sign.

Reproduction steps

  1. Open signs.yml
  2. Add &f to info-idle's fourth line
  3. Make an info sign for an arena
  4. Observe that it says "players to jo" on the fourth line.

I tested with a custom plugin. It's not that Minecraft cuts off the text. The last two characters don't exist on the sign. Therefore, I believe some limit internally in MobArena cuts off text that would overflow a sign. It does, however, not account for color/formatting codes not actually taking any additional space (except for bold, perhaps).

The behavior seems to be the same with both color and formatting codes. It doesn't matter whether one uses '§' or '&'.

Details

  • MobArena version: 0.108
  • Server version: git-Paper-478 (MC: 1.20.4)

Additional info

image image

EpicKnarvik97 avatar Apr 10 '24 10:04 EpicKnarvik97