Paper icon indicating copy to clipboard operation
Paper copied to clipboard

problem with Name and Lore including multiple space characters

Open muhyomuhyo opened this issue 4 years ago • 7 comments

issue

Expected behavior

multiple space characters in name and lore are ignored.

before paper #135, it's not happend.

expected behavior

should be.. name: stone axe (with 4 space characters) lore: 01 (with no space characters) 0 2 (with a space character) 0 3 (with 2 space characters) 0 4 (with 3 space characters) 0 5 (with 4 space characters) 0 6 (with 5 space characters) 0 7 (with 6 space characters) 0 8 (with 7 space characters) 0 9 (with 8 space characters) 0 x (with 9 space characters)

Observed/Actual behavior

current behavior (after #136) Name: stone axe (with a space character) 01 (with no space characters) 0 2 (with a space character) 0 3 (with a space character) 0 4 (with a space character) 0 5 (with a space character) 0 6 (with a space character) 0 7 (with a space character) 0 8 (with a space character) 0 9 (with a space character) 0 x (with a space character)

This may related with changes "fix empty array elements in command args (fixes #5777) #5778"

Steps/models to reproduce

see picture.

Plugin list

essentials, multiverse, worldGuard, worldEdit, worldborder, shopkeepers, LWCX, CoreProtect

Paper version

Paper version git-Paper-137 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: a67959e)

Agreements

  • [X] I am running the latest version of Paper available from https://papermc.io/downloads.
  • [X] I have searched for and ensured there isn't already an open issue regarding this.
  • [X] My version of Minecraft is supported by Paper.

Other

No response issue

muhyomuhyo avatar Jul 30 '21 14:07 muhyomuhyo

I get the same result on vanilla. I believe vanilla strips multiples spaces when rendering text.

For example, /give @p stone{display:{Lore:['[{"text":"0 1","italic":false}]','[{"text":"0 2","italic":false}]','[{"text":"0 3","italic":false}]']}} 1 produces single spaces between each of the number pairs.

kezz avatar Jul 30 '21 14:07 kezz

not happened on Vanilla. This happened on paper console command and happened only after paper 136. Before paper 135 , nothing happened.

This behavior related with fix #5777

Necessary multiple spaces in Lore and Name are trimmed against will.

muhyomuhyo avatar Aug 05 '21 23:08 muhyomuhyo

I did replicate the space stripping on vanilla with the command above.

kezz avatar Aug 06 '21 07:08 kezz

not reproducible on vanilla (this issue is exclusive to paper)

Test Command : image (~10 spaces in between hi and hi)

Vanilla Output (this is expected output) image

Paper-135 Output (the one before the change (this is expected output) image

Paper-136 Output (the one with the change (this is not expected output) image

Tested with no plugins on the versions given above

sxphirus avatar Aug 08 '21 20:08 sxphirus

So, is the issue that the Paper server is doing the stripping that the vanilla client does in the console, whereas the vanilla console doesn't do this?

kezz avatar Aug 08 '21 20:08 kezz

Yes, there was an earlier commit which tried to provide consistency between player and command execution in terms of how args work

electronicboy avatar Aug 08 '21 20:08 electronicboy

so revert #5778 , we can fix this problem?

muhyomuhyo avatar Aug 11 '21 08:08 muhyomuhyo