Skip to content

Commit

Permalink
Fixed skins restorer hook may throw NPE (#1264)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Jul 21, 2022
1 parent 6f9a2d6 commit f285d6f
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -128,6 +128,9 @@ public Property getSkin(SuperiorPlayer superiorPlayer) {
property = (IProperty) SKINS_RESTORER_GET_SKIN.invoke(SkinsRestorerAPI.getApi(), superiorPlayer.getName());
}

if (property == null)
return null;

if (property instanceof Property)
return ((Property) property);

Expand Down

0 comments on commit f285d6f

Please sign in to comment.