Class TwoFactorAddEvent
java.lang.Object
com.nickuc.login.api.event.velocity.twofactor.TwoFactorAddEvent
- All Implemented Interfaces:
EventWithPlayer
Event triggered when a 2FA account is added.
May be unavailable for PROXY
implementations.
-
Constructor Summary
ConstructorDescriptionTwoFactorAddEvent
(TwoFactorType type, com.velocitypowered.api.proxy.Player player, UUID playerId, String playerName, String account) -
Method Summary
Modifier and TypeMethodDescriptionReturn the twofactor account.com.velocitypowered.api.proxy.Player
Return the player instance.Returns the player's UUID.Returns the player's name.getType()
Returns the two factor type.
-
Constructor Details
-
TwoFactorAddEvent
public TwoFactorAddEvent(TwoFactorType type, com.velocitypowered.api.proxy.Player player, UUID playerId, String playerName, String account)
-
-
Method Details
-
getType
Returns the two factor type. -
getPlayer
@Nullable public com.velocitypowered.api.proxy.Player getPlayer()Return the player instance.It can be null if the account is added while the player is offline.
- Specified by:
getPlayer
in interfaceEventWithPlayer
-
getPlayerId
Returns the player's UUID.- Since:
- API v5
-
getPlayerName
Returns the player's name. -
getAccount
Return the twofactor account.
-