Vixio
Vixio copied to clipboard
Error when a command prefix contains quotes "
Describe the bug
It throws NPE when a prefix contains quotes but doesn't start and end with quotes, i found it when i made this mistake: "!prefix ", !"pfx "
To Reproduce
prefixes: !"xy "
prefixes: "
prefixes: !"
prefixes: x""
prefixes: "x
prefixes: ""
won't give error
Errors
#!#! java.lang.NullPointerException
#!#! at me.iblitzkriegi.vixio.commands.DiscordCommandFactory.add(DiscordCommandFactory.java:238)
#!#! at me.iblitzkriegi.vixio.commands.DiscordCommandRegistry.init(DiscordCommandRegistry.java:130)
Expected behavior
It should take the first example prefix as !"xy "
That would be caused by Skript itself, not Vixio. The way Skript treats quotes is directly, not as text. To make Skript treat quotes as text, you'll need to double them.
Your example: !"x "
What is should be: !""x ""
The same can also be said for percent %
symbols and hashtags #
not related :P https://github.com/iBlitzkriegi/Vixio/commit/43f43f4c3c03f02f13d797c4ecef15139cb3dd6c#diff-bde37a9a56449c44035a51ae10ea5d65