Class ProtocolLibProfileFactory
java.lang.Object
com.github.juliarn.npclib.bukkit.protocol.ProtocolLibProfileFactory
Factory for GameProfiles when working with ProtocolLib, as the new authlib v7 types are not properly supported.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final MethodHandleprivate static final MethodHandle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull com.comphenix.protocol.wrappers.WrappedGameProfilewrapProfile(com.github.juliarn.npclib.api.profile.Profile.Resolved profile) Wraps the given resolved profile into a ProtocolLibWrappedGameProfile.
-
Field Details
-
CONSTRUCT_PROFILE_MODERN
-
CONSTRUCT_PROFILE_PROPERTY_MODERN
-
-
Constructor Details
-
ProtocolLibProfileFactory
private ProtocolLibProfileFactory()
-
-
Method Details
-
wrapProfile
@NotNull public static @NotNull com.comphenix.protocol.wrappers.WrappedGameProfile wrapProfile(@NotNull com.github.juliarn.npclib.api.profile.Profile.Resolved profile) Wraps the given resolved profile into a ProtocolLibWrappedGameProfile.- Parameters:
profile- the profile to wrap.- Returns:
- the given profile wrapped into a
WrappedGameProfile. - Throws:
NullPointerException- if the given profile is null.IllegalArgumentException- if the given profile is invalid.IllegalStateException- if the profile construction failed for some reason.
-