-
Notifications
You must be signed in to change notification settings - Fork 260
Description
Confirmation
- My issue isn't already found on the Issue tracker.
- My issue is about PlaceholderAPI and not any expansion or external plugin
- The issue isn't already fixed in a Spigot Release or Development Build.
Type
Plugin Bug
What happens?
I have a multiple text block that always gets some lowercase letters after parsing it with PlaceholderAPI#setPlaceholders(Player, String).
At first, I thought it is something with the way how it is processed before the PlaceholderAPI, but after adding debug code, I found out that it is PlaceholderAPI plugin that changes letters capitalization.
This is a string that I passed to the PlaceholderAPI#setPlaceholders(Player, String) method:
[description]
Blocks:
Stone - 20%
Coal Ore - 5%
Iron Ore - 35%
Gold Ore - 10%
Redstone Ore - 20%
Emerald Ore - 5%
Diamond Ore - 5%
Treasure:
Diamond - 0.1%
Supports:
Cobblestone Generators
Stone Generators
Operates in all biomes
And this method returned this text:
[description]
Blocks:
Stone - 20%
coal Ore - 5%
iron Ore - 35%
gold Ore - 10%
redstone Ore - 20%
emerald Ore - 5%
diamond Ore - 5%
treasure:
diamond - 0.1%
supports:
cobblestone Generators
Stone Generators
Operates in all biomes
As you can see, the text lost a lot of first capital letters.
Is this an issue with multiple lines or the fact, that the given text does not have any placeholders but it has % char?
Expected Behaviour
The text should not lose capital letters, even if there are no Placeholders for parsing.
How to Reproduce
- Create a string with multiple lines (\n) that contains
% - Start every line with a capital letter.
- Use PlaceholderAPI#setPlaceholders(Player, String) to check if capitalization is not changed.
/papi dump Output
https://paste.helpch.at/etogijewun
Console Log
No response
Errors
No response
Additional Info
StringBuilder manualParser = new StringBuilder();
manualParser.append("&4Somehow %").append("\n");
manualParser.append("Char breaks %").append("\n");
manualParser.append("Capitalization for %").append("\n");
manualParser.append("Every next line %").append("\n");
manualParser.append("AND it is not NICE").append("\n");
System.out.println(PlaceholderAPI.setPlaceholders(player, manualParser.toString()));