Configurable valid characters for usernames

This commit is contained in:
BillyGalbreath
2025-01-12 14:07:58 -08:00
committed by granny
parent 36fb3e07d7
commit a79838e874
3 changed files with 18 additions and 34 deletions

View File

@@ -0,0 +1,10 @@
--- a/net/minecraft/util/StringUtil.java
+++ b/net/minecraft/util/StringUtil.java
@@ -87,6 +_,7 @@
// Paper start - Username validation
public static boolean isReasonablePlayerName(final String name) {
+ if (true) return org.purpurmc.purpur.PurpurConfig.usernameValidCharactersPattern.matcher(name).matches(); // Purpur - Configurable valid characters for usernames
if (name.isEmpty() || name.length() > 16) {
return false;
}