Contents
Class PlayerAuthentication
java.lang.Object
com.hypixel.hytale.server.core.auth.PlayerAuthentication
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum allowed size for referral data in bytes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Gets the referral data sent with a SetUsername packet during server transfer, if any.Gets the source server that referred this player (for abuse detection).getSkin()getUuid()voidsetReferralData(byte[] referralData) Sets the referral data for this authentication.voidsetReferralSource(HostAddress referralSource) Sets the referral source server for this authentication.voidsetSkin(PlayerSkin skin) voidsetUsername(String username) void
-
Field Details
-
MAX_REFERRAL_DATA_SIZE
public static final int MAX_REFERRAL_DATA_SIZEMaximum allowed size for referral data in bytes.- See Also:
-
-
Constructor Details
-
PlayerAuthentication
public PlayerAuthentication() -
PlayerAuthentication
-
-
Method Details
-
getUsername
-
getUuid
-
setUsername
-
setUuid
-
getReferralData
@Nullable public byte[] getReferralData()Gets the referral data sent with a SetUsername packet during server transfer, if any.- Returns:
- the referral data, or null if not a referral connection
-
setReferralData
public void setReferralData(@Nullable byte[] referralData) Sets the referral data for this authentication.- Parameters:
referralData- the referral data to store- Throws:
IllegalArgumentException- if referralData exceeds maximum size
-
getReferralSource
Gets the source server that referred this player (for abuse detection).- Returns:
- the source server address, or null if not a referral
-
setReferralSource
Sets the referral source server for this authentication.- Parameters:
referralSource- the source server address
-
getSkin
-
setSkin
-