File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,20 +202,20 @@ protected function encodePayload(ByteBufferWriter $out) : void{
202202 case self ::TYPE_WHISPER :
203203 /** @noinspection PhpMissingBreakStatementInspection */
204204 case self ::TYPE_ANNOUNCEMENT :
205- CommonTypes::putString ($ out , $ this ->sourceName );
205+ CommonTypes::putString ($ out , $ this ->sourceName === '' ? ' ' : $ this -> sourceName );
206206 case self ::TYPE_RAW :
207207 case self ::TYPE_TIP :
208208 case self ::TYPE_SYSTEM :
209209 case self ::TYPE_JSON_WHISPER :
210210 case self ::TYPE_JSON :
211211 case self ::TYPE_JSON_ANNOUNCEMENT :
212- CommonTypes::putString ($ out , $ this ->message );
212+ CommonTypes::putString ($ out , $ this ->message === '' ? ' ' : $ this -> message );
213213 break ;
214214
215215 case self ::TYPE_TRANSLATION :
216216 case self ::TYPE_POPUP :
217217 case self ::TYPE_JUKEBOX_POPUP :
218- CommonTypes::putString ($ out , $ this ->message );
218+ CommonTypes::putString ($ out , $ this ->message === '' ? ' ' : $ this -> message );
219219 VarInt::writeUnsignedInt ($ out , count ($ this ->parameters ));
220220 foreach ($ this ->parameters as $ p ){
221221 CommonTypes::putString ($ out , $ p );
You can’t perform that action at this time.
0 commit comments