Skip to content

Commit

Permalink
Fix retrieving skin texture
Browse files Browse the repository at this point in the history
Use value field instead of getValue() method, on newer versions the authlib uses a record so getValue() is now value()
  • Loading branch information
virustotalop committed Dec 30, 2023
1 parent 6bec2ff commit b9f1f42
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ public String getSkinTexture() {
if (property == null) {
return null;
}
return (String) property.getClass().getDeclaredMethod("getValue").invoke(property);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException |
ClassNotFoundException e) {
return (String) ReflectionUtil.getDeclaredField(property.getClass(), "value").get(property);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException
| ClassNotFoundException e) {
e.printStackTrace();
return null;
}
Expand Down

0 comments on commit b9f1f42

Please sign in to comment.