mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 18:41:47 +00:00
Allow spaces in player names
This commit is contained in:
parent
319735db3a
commit
8b33f711d0
@ -184,7 +184,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
public static function isValidUserName(string $name) : bool{
|
public static function isValidUserName(string $name) : bool{
|
||||||
$lname = strtolower($name);
|
$lname = strtolower($name);
|
||||||
$len = strlen($name);
|
$len = strlen($name);
|
||||||
return $lname !== "rcon" and $lname !== "console" and $len >= 1 and $len <= 16 and preg_match("/[^A-Za-z0-9_]/", $name) === 0;
|
return $lname !== "rcon" and $lname !== "console" and $len >= 1 and $len <= 16 and preg_match("/[^A-Za-z0-9_ ]/", $name) === 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user