mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 10:19:39 +00:00
reverse BC-breaking change to Player->changeSkin()
this change would cause LSP violations for subclasses
This commit is contained in:
parent
f6b5301e17
commit
e60962c31f
@ -836,10 +836,12 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
|||||||
* Plugin developers should not use this, use setSkin() and sendSkin() instead.
|
* Plugin developers should not use this, use setSkin() and sendSkin() instead.
|
||||||
*
|
*
|
||||||
* @param Skin $skin
|
* @param Skin $skin
|
||||||
|
* @param string $newSkinName
|
||||||
|
* @param string $oldSkinName
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function changeSkin(Skin $skin) : bool{
|
public function changeSkin(Skin $skin, string $newSkinName, string $oldSkinName) : bool{
|
||||||
if(!$skin->isValid()){
|
if(!$skin->isValid()){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,7 @@ class PlayerNetworkSessionAdapter extends NetworkSession{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function handlePlayerSkin(PlayerSkinPacket $packet) : bool{
|
public function handlePlayerSkin(PlayerSkinPacket $packet) : bool{
|
||||||
return $this->player->changeSkin($packet->skin);
|
return $this->player->changeSkin($packet->skin, "", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleBookEdit(BookEditPacket $packet) : bool{
|
public function handleBookEdit(BookEditPacket $packet) : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user