player = $player; } /** * Sets the message shown on the kicked player's disconnection screen. * This message is also displayed in the console and server log. */ public function setReason(string $reason) : void{ $this->reason = $reason; } /** * Returns the message shown on the kicked player's disconnection screen. * This message is also displayed in the console and server log. * When kicked by the /kick command, the default is something like "Kicked by admin.". */ public function getReason() : string{ return $this->reason; } /** * Sets the quit message broadcasted to other players. */ public function setQuitMessage(Translatable|string $quitMessage) : void{ $this->quitMessage = $quitMessage; } /** * Returns the quit message broadcasted to other players, e.g. "Steve left the game". */ public function getQuitMessage() : Translatable|string{ return $this->quitMessage; } }