Merge branch 'stable' into next-minor

# Conflicts:
#	src/pocketmine/Player.php
#	src/pocketmine/block/SnowLayer.php
This commit is contained in:
Dylan K. Taylor
2020-06-01 13:42:59 +01:00
15 changed files with 93 additions and 38 deletions

View File

@ -83,7 +83,7 @@ class Bow extends Tool{
}
$ev = new EntityShootBowEvent($player, $this, $entity, $baseForce * 3);
if($baseForce < 0.1 or $diff < 5){
if($baseForce < 0.1 or $diff < 5 or $player->isSpectator()){
$ev->setCancelled();
}

View File

@ -50,7 +50,7 @@ class WritableBook extends Item{
*/
public function getPageText(int $pageId) : ?string{
$pages = $this->getNamedTag()->getListTag(self::TAG_PAGES);
if($pages === null){
if($pages === null or !$pages->isset($pageId)){
return null;
}