From 6aa827653230ace3fd122749724ed2c1aac2b65e Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 26 Apr 2019 15:41:19 +0100 Subject: [PATCH] Revert "Player: removed useless addActionBarMessage()" This reverts commit 7d22b2a6d7d372a5020b9a2b44a93cdc821565c8. --- src/pocketmine/Player.php | 9 +++++++++ src/pocketmine/command/defaults/TitleCommand.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 90194a3ff..8ac2816c2 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2279,6 +2279,15 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener, $this->sendTitleText($subtitle, SetTitlePacket::TYPE_SET_SUBTITLE); } + /** + * Adds small text to the user's screen. + * + * @param string $message + */ + public function addActionBarMessage(string $message){ + $this->sendTitleText($message, SetTitlePacket::TYPE_SET_ACTIONBAR_MESSAGE); + } + /** * Removes the title from the client's screen. */ diff --git a/src/pocketmine/command/defaults/TitleCommand.php b/src/pocketmine/command/defaults/TitleCommand.php index 6a49ec544..667eeee08 100644 --- a/src/pocketmine/command/defaults/TitleCommand.php +++ b/src/pocketmine/command/defaults/TitleCommand.php @@ -82,7 +82,7 @@ class TitleCommand extends VanillaCommand{ throw new InvalidCommandSyntaxException(); } - $player->sendTip(implode(" ", array_slice($args, 2))); + $player->addActionBarMessage(implode(" ", array_slice($args, 2))); break; case "times": if(count($args) < 5){