Clean up Skin error handling, close #2926

Skin->__construct() now does all the validation.
This commit is contained in:
Dylan K. Taylor
2019-05-27 16:20:46 +01:00
parent 0a891f5408
commit 89242543b9
7 changed files with 47 additions and 73 deletions

View File

@ -70,7 +70,6 @@ class PlayerChangeSkinEvent extends PlayerEvent implements Cancellable{
* @throws \InvalidArgumentException if the specified skin is not valid
*/
public function setNewSkin(Skin $skin) : void{
$skin->validate();
$this->newSkin = $skin;
}
}