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

use String.valueOf instead of appending to empty string

This commit is contained in:
Jeroen 2023-08-30 00:10:25 +02:00 committed by GitHub
parent cb292aeffe
commit df479f1d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
i += ("" + vars[idx++]).length();
i += String.valueOf(vars[idx++]).length();
}
return msg;