Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't write single quote in item nbt #6478

Closed
1 task done
CirrusPreeminent opened this issue Mar 5, 2024 · 1 comment
Closed
1 task done

can't write single quote in item nbt #6478

CirrusPreeminent opened this issue Mar 5, 2024 · 1 comment
Labels
addon-related An issue that is related to an addon and not Skript. invalid Not a Skript issue, already implemented, does not apply, etc.

Comments

@CirrusPreeminent
Copy link

Skript/Server Version

Server Version: git-Paper-196 (MC: 1.20.1)
Skript Version: 2.7.3 (skriptlang-github)

Bug Description

When I try to add single quote in item NBT there will be backslash () come out of nowhere

This is the script:

on pick up:
    send "test1"
    If event-item is stick:
        set {_e} to event-item
        send "test2"
        set {_test::*} to lore of {_e}
        send "%{_test::*}%"
        If lore of {_e} contains "&bเส้นใยแมงมุมมีความแข็ง":
            send "test3"  
            set {_nbt} to nbt compound of {_e}
            set {_oldnbt} to tag "display;Lore" of {_nbt}
            set {_newnbt} to "{""extra"":[{""text"":""""},{""bold"":false,""italic"":false,""underlined"":false,""strikethrough"":false,""obfuscated"":false,""color"":""white"",""text"":""""}],""text"":""""}', '{""extra"":[{""bold"":false,""italic"":false,""underlined"":false,""strikethrough"":false,""obfuscated"":false,""color"":""white"",""text"":""""}],""text"":""""}', '{""extra"":[{""bold"":false,""italic"":false,""underlined"":false,""strikethrough"":false,""obfuscated"":false,""color"":""dark_gray"",""text"":""[""},{""italic"":false,""color"":""white"",""text"":""ข้อมูลไอเทม""},{""italic"":false,""color"":""dark_gray"",""text"":""]""}],""text"":""}', '{""extra"":[{""bold"":false,""italic"":false,""underlined"":false,""strikethrough"":false,""obfuscated"":false,""color"":""aqua"",""text"":""เส้นใยแมงมุมมีความแข็ง""}],""text"":""""}', '{""extra"":[{""bold"":false,""italic"":false,""underlined"":false,""strikethrough"":false,""obfuscated"":false,""color"":""aqua"",""text"":""มากกว่าเหล็กกล้า""}],""text"":""""}', '{""extra"":[{""bold"":false,""italic"":false,""underlined"":false,""strikethrough"":false,""obfuscated"":false,""color"":""white"",""text"":""""}],""text"":""""}', '{""extra"":[{""bold"":false,""italic"":false,""underlined"":false,""strikethrough"":false,""obfuscated"":false,""color"":""yellow"",""text"":""ระดับ:""},{""italic"":false,""color"":""white"",""text"":""""},{""italic"":false,""text"":""""}],""text"":""""}"
            set tag "display;Lore" of nbt compound of event-item to {_newnbt}
        

This is the result of item NBT tag Lore after edit:

Lore: ['{"extra":[{"text":""},{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"white","text":""}],"text":""}\', \'{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"white","text":""}],"text":""}\', \'{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"dark_gray","text":"["},{"italic":false,"color":"white","text":"ข้อมูลไอเทม"},{"italic":false,"color":"dark_gray","text":"]"}],"text":"}\', \'{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"aqua","text":"เส้นใยแมงมุมมีความแข็ง"}],"text":""}\', \'{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"aqua","text":"มากกว่าเหล็กกล้า"}],"text":""}\', \'{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"white","text":""}],"text":""}\', \'{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"yellow","text":"ระดับ:"},{"italic":false,"color":"white","text":""},{"italic":false,"text":""}],"text":""}']}

From the result you can see that before every single quote, there will be a backslash() Infront of it where it not suppose to.

Expected Behavior

The result NBT shouldn't have back slash before single quote.

Steps to Reproduce

Change NBT of item and include single quote to it

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@sovdeeth
Copy link
Member

sovdeeth commented Mar 5, 2024

This is something you should be reporting to SkBee, if it is indeed actually a bug. Skript doesn't handle NBT stuff.

@sovdeeth sovdeeth closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
@sovdeeth sovdeeth added invalid Not a Skript issue, already implemented, does not apply, etc. addon-related An issue that is related to an addon and not Skript. labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon-related An issue that is related to an addon and not Skript. invalid Not a Skript issue, already implemented, does not apply, etc.
Projects
None yet
Development

No branches or pull requests

2 participants