TownyAdvanced / TownyFlight

Flight plugin for Towny servers.
https://townyadvanced.github.io/
Other
23 stars 17 forks source link

Bug: Double-Quoted Strings get reduced to Single-Quoted Strings in Config #28

Closed UberPilot closed 4 years ago

UberPilot commented 4 years ago

What is the issue that you see?

What steps can be done to repeat the issue on a test server?

  1. Install Towny and TownyFlight.
  2. Set pluginPrefix: "&3Towny &7\u00bb &f"
  3. Reload the plugin or restart the server.
  4. Notice the new prefix, displaying the unicode right-pointing double angle quotation mark in the prefix.
  5. pluginPrefix will turn into pluginPrefix: '&3Towny &7� &f' in the config, with � being the replacement (0xFFFD) character.
  6. Reload the plugin or restart the server again.
  7. Notice the new prefix, displaying the unicode replacement character.

What is supposed to happen instead?

  1. pluginPrefix should remain double-quoted and display unicode characters.

Versions/Files

Towny Version (use '/towny v' in game): 0.96.0.1 TownyFlight Version: 1.5.7 Link to TownyFlight config.yml (errored): https://pastebin.com/4j9SFNmY Link to TownyFlight config.yml (ideal): https://pastebin.com/sii2Sw9w

LlmDl commented 4 years ago

Does it do anything differently when you use the » instead of \u00bb in the file?

UberPilot commented 4 years ago

No, it doesn't. It still gets replaced to the same string from step 5 above.

UberPilot commented 4 years ago

Turns out that this was a pretty trivial fix. I've created a pull request that will solve this.

LlmDl commented 4 years ago

Looks like we went to take care of this at pretty much the exact same time. Thanks though.