reverse BC-breaking change to Player->changeSkin()

this change would cause LSP violations for subclasses
This commit is contained in:
Dylan K. Taylor 2019-11-08 11:22:55 +00:00
parent f6b5301e17
commit e60962c31f
2 changed files with 4 additions and 2 deletions

View File

@ -836,10 +836,12 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
* Plugin developers should not use this, use setSkin() and sendSkin() instead.
*
* @param Skin $skin
* @param string $newSkinName
* @param string $oldSkinName
*
* @return bool
*/
public function changeSkin(Skin $skin) : bool{
public function changeSkin(Skin $skin, string $newSkinName, string $oldSkinName) : bool{
if(!$skin->isValid()){
return false;
}

View File

@ -253,7 +253,7 @@ class PlayerNetworkSessionAdapter extends NetworkSession{
}
public function handlePlayerSkin(PlayerSkinPacket $packet) : bool{
return $this->player->changeSkin($packet->skin);
return $this->player->changeSkin($packet->skin, "", "");
}
public function handleBookEdit(BookEditPacket $packet) : bool{