Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor 2021-12-27 16:52:22 +00:00
commit f5144d49b1
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 15 additions and 14 deletions

26
composer.lock generated
View File

@ -535,16 +535,16 @@
}, },
{ {
"name": "pocketmine/locale-data", "name": "pocketmine/locale-data",
"version": "2.2.0", "version": "2.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/pmmp/Language.git", "url": "https://github.com/pmmp/Language.git",
"reference": "dc88ad618a482e55b7c9fec162257efa62a67d6f" "reference": "9fdd36f0ac3a2dfe1acacbee8b23eb6615129701"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/pmmp/Language/zipball/dc88ad618a482e55b7c9fec162257efa62a67d6f", "url": "https://api.github.com/repos/pmmp/Language/zipball/9fdd36f0ac3a2dfe1acacbee8b23eb6615129701",
"reference": "dc88ad618a482e55b7c9fec162257efa62a67d6f", "reference": "9fdd36f0ac3a2dfe1acacbee8b23eb6615129701",
"shasum": "" "shasum": ""
}, },
"type": "library", "type": "library",
@ -552,9 +552,9 @@
"description": "Language resources used by PocketMine-MP", "description": "Language resources used by PocketMine-MP",
"support": { "support": {
"issues": "https://github.com/pmmp/Language/issues", "issues": "https://github.com/pmmp/Language/issues",
"source": "https://github.com/pmmp/Language/tree/2.2.0" "source": "https://github.com/pmmp/Language/tree/2.2.1"
}, },
"time": "2021-12-15T02:01:24+00:00" "time": "2021-12-17T23:42:12+00:00"
}, },
{ {
"name": "pocketmine/log", "name": "pocketmine/log",
@ -2388,16 +2388,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "9.5.10", "version": "9.5.11",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" "reference": "2406855036db1102126125537adb1406f7242fdd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2406855036db1102126125537adb1406f7242fdd",
"reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "reference": "2406855036db1102126125537adb1406f7242fdd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2475,11 +2475,11 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.11"
}, },
"funding": [ "funding": [
{ {
"url": "https://phpunit.de/donate.html", "url": "https://phpunit.de/sponsors.html",
"type": "custom" "type": "custom"
}, },
{ {
@ -2487,7 +2487,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2021-09-25T07:38:51+00:00" "time": "2021-12-25T07:07:57+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",

View File

@ -136,6 +136,7 @@ use function floor;
use function get_class; use function get_class;
use function is_int; use function is_int;
use function max; use function max;
use function mb_strlen;
use function microtime; use function microtime;
use function min; use function min;
use function preg_match; use function preg_match;
@ -1334,7 +1335,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$message = TextFormat::clean($message, false); $message = TextFormat::clean($message, false);
foreach(explode("\n", $message) as $messagePart){ foreach(explode("\n", $message) as $messagePart){
if(trim($messagePart) !== "" and strlen($messagePart) <= 255 and $this->messageCounter-- > 0){ if(trim($messagePart) !== "" and mb_strlen($messagePart, 'UTF-8') <= 512 and $this->messageCounter-- > 0){
if(strpos($messagePart, './') === 0){ if(strpos($messagePart, './') === 0){
$messagePart = substr($messagePart, 1); $messagePart = substr($messagePart, 1);
} }