mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Merge branch 'next-minor' into next-major
This commit is contained in:
@ -146,8 +146,8 @@ use function morton2d_encode;
|
||||
use function preg_match;
|
||||
use function spl_object_id;
|
||||
use function sqrt;
|
||||
use function str_starts_with;
|
||||
use function strlen;
|
||||
use function strpos;
|
||||
use function strtolower;
|
||||
use function substr;
|
||||
use function trim;
|
||||
@ -1436,11 +1436,11 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
$message = TextFormat::clean($message, false);
|
||||
foreach(explode("\n", $message, $this->messageCounter + 1) as $messagePart){
|
||||
if(trim($messagePart) !== "" && strlen($messagePart) <= self::MAX_CHAT_BYTE_LENGTH && mb_strlen($messagePart, 'UTF-8') <= self::MAX_CHAT_CHAR_LENGTH && $this->messageCounter-- > 0){
|
||||
if(strpos($messagePart, './') === 0){
|
||||
if(str_starts_with($messagePart, './')){
|
||||
$messagePart = substr($messagePart, 1);
|
||||
}
|
||||
|
||||
if(strpos($messagePart, "/") === 0){
|
||||
if(str_starts_with($messagePart, "/")){
|
||||
Timings::$playerCommand->startTiming();
|
||||
$this->server->dispatchCommand($this, substr($messagePart, 1));
|
||||
Timings::$playerCommand->stopTiming();
|
||||
@ -2463,7 +2463,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
$this->cursorInventory = new PlayerCursorInventory($this);
|
||||
$this->craftingGrid = new PlayerCraftingInventory($this);
|
||||
|
||||
$this->addPermanentInventories($this->inventory, $this->armorInventory, $this->cursorInventory, $this->offHandInventory);
|
||||
$this->addPermanentInventories($this->inventory, $this->armorInventory, $this->cursorInventory, $this->offHandInventory, $this->craftingGrid);
|
||||
|
||||
//TODO: more windows
|
||||
}
|
||||
|
Reference in New Issue
Block a user