1
0
mirror of https://github.com/Suiranoil/SkinRestorer.git synced 2026-01-16 04:42:12 +00:00

create StringUtils.isValidPlayerName for backporting

This commit is contained in:
2024-09-24 07:57:05 +03:00
parent 7eedb79453
commit 7aa3316d0f

View File

@@ -17,4 +17,8 @@ public final class StringUtils {
return response.toString();
}
public static boolean isValidPlayerName(String playerName) {
return playerName.length() <= 16 && playerName.chars().filter(i -> i <= 32 || i >= 127).findAny().isEmpty();
}
}