Merge branch 'next-minor'

This commit is contained in:
Dylan K. Taylor
2019-10-22 19:05:11 +01:00
11 changed files with 39 additions and 16 deletions

View File

@@ -199,6 +199,9 @@ class Human extends Living implements ProjectileSource, InventoryHolder{
return (int) min(100, 7 * $this->xpManager->getXpLevel());
}
/**
* @return PlayerInventory
*/
public function getInventory(){
return $this->inventory;
}

View File

@@ -23,9 +23,9 @@ declare(strict_types=1);
namespace pocketmine\entity;
use Ahc\Json\Comment as CommentedJsonDecoder;
use function implode;
use function in_array;
use function json_decode;
use function json_encode;
use function json_last_error_msg;
use function strlen;
@@ -61,7 +61,7 @@ final class Skin{
}
if($geometryData !== ""){
$decodedGeometry = json_decode($geometryData);
$decodedGeometry = (new CommentedJsonDecoder())->decode($geometryData);
if($decodedGeometry === false){
throw new \InvalidArgumentException("Invalid geometry data (" . json_last_error_msg() . ")");
}