diff --git a/composer.lock b/composer.lock index 2b6a1be72..e5b15647a 100644 --- a/composer.lock +++ b/composer.lock @@ -535,16 +535,16 @@ }, { "name": "pocketmine/locale-data", - "version": "2.2.0", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/pmmp/Language.git", - "reference": "dc88ad618a482e55b7c9fec162257efa62a67d6f" + "reference": "9fdd36f0ac3a2dfe1acacbee8b23eb6615129701" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/Language/zipball/dc88ad618a482e55b7c9fec162257efa62a67d6f", - "reference": "dc88ad618a482e55b7c9fec162257efa62a67d6f", + "url": "https://api.github.com/repos/pmmp/Language/zipball/9fdd36f0ac3a2dfe1acacbee8b23eb6615129701", + "reference": "9fdd36f0ac3a2dfe1acacbee8b23eb6615129701", "shasum": "" }, "type": "library", @@ -552,9 +552,9 @@ "description": "Language resources used by PocketMine-MP", "support": { "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", @@ -2388,16 +2388,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.10", + "version": "9.5.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" + "reference": "2406855036db1102126125537adb1406f7242fdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", - "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2406855036db1102126125537adb1406f7242fdd", + "reference": "2406855036db1102126125537adb1406f7242fdd", "shasum": "" }, "require": { @@ -2475,11 +2475,11 @@ ], "support": { "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": [ { - "url": "https://phpunit.de/donate.html", + "url": "https://phpunit.de/sponsors.html", "type": "custom" }, { @@ -2487,7 +2487,7 @@ "type": "github" } ], - "time": "2021-09-25T07:38:51+00:00" + "time": "2021-12-25T07:07:57+00:00" }, { "name": "sebastian/cli-parser", diff --git a/src/player/Player.php b/src/player/Player.php index 400a254c2..2dea72efc 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -136,6 +136,7 @@ use function floor; use function get_class; use function is_int; use function max; +use function mb_strlen; use function microtime; use function min; use function preg_match; @@ -1334,7 +1335,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ $message = TextFormat::clean($message, false); 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){ $messagePart = substr($messagePart, 1); }