Merge branch 'stable'

This commit is contained in:
Dylan K. Taylor
2021-08-19 15:39:16 +01:00
14 changed files with 261 additions and 36 deletions

View File

@ -149,6 +149,9 @@ namespace pocketmine {
* @return void
*/
function emit_performance_warnings(\Logger $logger){
if(PHP_DEBUG !== 0){
$logger->warning("This PHP binary was compiled in debug mode. This has a major impact on performance.");
}
if(extension_loaded("xdebug")){
$logger->warning("Xdebug extension is enabled. This has a major impact on performance.");
}

View File

@ -32,6 +32,7 @@ final class VersionInfo{
public const BASE_VERSION = "4.0.0";
public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_NUMBER = 0;
public const BUILD_CHANNEL = "";
private function __construct(){
//NOOP

View File

@ -1926,6 +1926,8 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
//prevent the player receiving their own disconnect message
$this->server->unsubscribeFromAllBroadcastChannels($this);
$this->doCloseInventory();
$ev = new PlayerQuitEvent($this, $quitMessage ?? $this->getLeaveMessage(), $reason);
$ev->call();
if(($quitMessage = $ev->getQuitMessage()) != ""){