1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

skip already substituted parts when formatting message

This commit is contained in:
Jeroen 2023-07-24 23:25:25 +02:00
parent dc22e66589
commit cb292aeffe

View File

@ -106,7 +106,7 @@ public final class Debug {
while ((i = msg.indexOf('{', i)) != -1 && msg.charAt(i + 1) == '}') {
// Substring up to the opening brace `{`, add the variable for this and add the rest of the message
msg = msg.substring(0, i) + vars[idx] + msg.substring(i + 2);
idx++;
i += ("" + vars[idx++]).length();
}
return msg;