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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user