Skip to content

Commit

Permalink
Fixed issues with subtitles not working correctly, close #823 (#825)
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps authored Apr 14, 2017
2 parents 7c66af5 + 319763d commit 40775f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pocketmine/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -3415,10 +3415,10 @@ public function kick($reason = "", $isAdmin = true){
*/
public function addTitle(string $title, string $subtitle = "", int $fadeIn = -1, int $stay = -1, int $fadeOut = -1){
$this->setTitleDuration($fadeIn, $stay, $fadeOut);
$this->sendTitleText($title, SetTitlePacket::TYPE_SET_TITLE);
if($subtitle !== ""){
$this->sendTitleText($subtitle, SetTitlePacket::TYPE_SET_SUBTITLE);
}
$this->sendTitleText($title, SetTitlePacket::TYPE_SET_TITLE);
}

/**
Expand Down

0 comments on commit 40775f5

Please sign in to comment.