Use native union types for TranslationContainer|string

This commit is contained in:
Dylan K. Taylor
2021-08-10 15:17:26 +01:00
parent 27a2d06083
commit b4c0ddd155
9 changed files with 21 additions and 75 deletions

View File

@ -58,10 +58,7 @@ class ConsoleCommandSender implements CommandSender{
return $this->language;
}
/**
* @param TranslationContainer|string $message
*/
public function sendMessage($message) : void{
public function sendMessage(TranslationContainer|string $message) : void{
$server = $this->getServer();
if($message instanceof TranslationContainer){
$message = $this->getLanguage()->translate($message);