Skip to content

Commit 187b456

Browse files
Add shorthand ResolvableProfile constructor
1 parent 9f4bed4 commit 187b456

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/player/ResolvableProfile.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,9 @@ public class ResolvableProfile {
1717
private final @Nullable Key elytra;
1818
private final @Nullable GameProfile.TextureModel model;
1919
private final boolean dynamic;
20+
21+
public ResolvableProfile(GameProfile profile) {
22+
// A profile is dynamic in Java 1.21.9 when it is missing UUID, name, or properties (empty properties are fine)
23+
this(profile, null, null, null, null, !profile.isComplete() || profile.getProperties() == null);
24+
}
2025
}

0 commit comments

Comments
 (0)