Class TransformableProfile
java.lang.Object
com.cryptomorin.xseries.profiles.objects.transformer.TransformableProfile
- All Implemented Interfaces:
Profileable
The default implementation used for
Profileable.transform(ProfileTransformer...)- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.cryptomorin.xseries.profiles.objects.Profileable
Profileable.GameProfileProfileable, Profileable.PlayerProfileable, Profileable.StringProfileable, Profileable.UsernameProfileable, Profileable.UUIDProfileable -
Constructor Summary
ConstructorsConstructorDescriptionTransformableProfile(Profileable profileable, List<ProfileTransformer> transformers) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.authlib.GameProfileThis method should not be used directly unless you know what you're doing.transform(ProfileTransformer... transformers) Adds transformer (readProfileTransformer) information to a copied version of this profile (so it doesn't affect this instance, but the class type will change).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cryptomorin.xseries.profiles.objects.Profileable
getDisposableProfile, getProfileValue, test
-
Constructor Details
-
TransformableProfile
@Internal public TransformableProfile(Profileable profileable, List<ProfileTransformer> transformers)
-
-
Method Details
-
transform
Description copied from interface:ProfileableAdds transformer (readProfileTransformer) information to a copied version of this profile (so it doesn't affect this instance, but the class type will change). So it's recommended to not chain this method and instead collect all transformers and call this method once for performance when necessary.Profiles are copied before being transformed, so the main cache remains intact but the result of transformed profiles are never cached.
- Specified by:
transformin interfaceProfileable- Parameters:
transformers- a list of transformers to apply in order onceProfileable.getProfile()is called.
-
getProfile
public com.mojang.authlib.GameProfile getProfile()Description copied from interface:ProfileableThis method should not be used directly unless you know what you're doing.The texture which might be cached. If any errors occur, the check may be re-evaluated. The cached values might also be re-evaluated due to expiration.
- Specified by:
getProfilein interfaceProfileable- Returns:
- the original profile (not cloned if possible) for an instance that's always guaranteed to be a copy
you can use
Profileable.getDisposableProfile()instead. Null if no profile is set (only happens forProfileContainer).
-