mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Merge branch 'next-major' into modern-world-support
This commit is contained in:
commit
567bd8e330
@ -54,7 +54,7 @@
|
||||
"webmozart/path-util": "^2.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "1.6.8",
|
||||
"phpstan/phpstan": "1.7.1",
|
||||
"phpstan/phpstan-phpunit": "^1.1.0",
|
||||
"phpstan/phpstan-strict-rules": "^1.2.0",
|
||||
"phpunit/phpunit": "^9.2"
|
||||
|
14
composer.lock
generated
14
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f9bd717430394f8e47f421ce1aecaf32",
|
||||
"content-hash": "17e7814a247ffefd8c9cee9530263eb4",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/json-comment",
|
||||
@ -1846,16 +1846,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "1.6.8",
|
||||
"version": "1.7.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "d76498c5531232cb8386ceb6004f7e013138d3ba"
|
||||
"reference": "e3baed2ee2ef322e0f9b8fe8f87fdbe024c7c719"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/d76498c5531232cb8386ceb6004f7e013138d3ba",
|
||||
"reference": "d76498c5531232cb8386ceb6004f7e013138d3ba",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e3baed2ee2ef322e0f9b8fe8f87fdbe024c7c719",
|
||||
"reference": "e3baed2ee2ef322e0f9b8fe8f87fdbe024c7c719",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1881,7 +1881,7 @@
|
||||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||
"source": "https://github.com/phpstan/phpstan/tree/1.6.8"
|
||||
"source": "https://github.com/phpstan/phpstan/tree/1.7.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1901,7 +1901,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-05-10T06:54:21+00:00"
|
||||
"time": "2022-05-24T09:05:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-phpunit",
|
||||
|
@ -1380,6 +1380,11 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
public function chat(string $message) : bool{
|
||||
$this->removeCurrentWindow();
|
||||
|
||||
if($this->messageCounter <= 0){
|
||||
//the check below would take care of this (0 * (maxlen + 1) = 0), but it's better be explicit
|
||||
return false;
|
||||
}
|
||||
|
||||
//Fast length check, to make sure we don't get hung trying to explode MBs of string ...
|
||||
$maxTotalLength = $this->messageCounter * (self::MAX_CHAT_BYTE_LENGTH + 1);
|
||||
if(strlen($message) > $maxTotalLength){
|
||||
|
Loading…
x
Reference in New Issue
Block a user