Merge branch 'stable'

This commit is contained in:
Dylan K. Taylor
2019-04-15 16:11:49 +01:00
3 changed files with 21 additions and 4 deletions

View File

@ -464,8 +464,12 @@ class SimpleSessionHandler extends SessionHandler{
throw new BadPacketException("Invalid sign text update: " . $e->getMessage(), 0, $e);
}
if(!$block->updateText($this->player, $text)){
$this->player->getLevel()->sendBlocks([$this->player], [$block]);
try{
if(!$block->updateText($this->player, $text)){
$this->player->getLevel()->sendBlocks([$this->player], [$block]);
}
}catch(\UnexpectedValueException $e){
throw new BadPacketException($e->getMessage(), 0, $e);
}
return true;