Class TwoFactorAddEvent

java.lang.Object
net.md_5.bungee.api.plugin.Event
com.nickuc.login.api.event.internal.bungee.BungeeEvent
com.nickuc.login.api.event.bungee.twofactor.TwoFactorAddEvent
All Implemented Interfaces:
EventWithPlayer

public class TwoFactorAddEvent extends BungeeEvent implements EventWithPlayer
Event triggered when a 2FA account is added.

May be unavailable for PROXY implementations.

  • Constructor Details

    • TwoFactorAddEvent

      public TwoFactorAddEvent(TwoFactorType type, net.md_5.bungee.api.connection.ProxiedPlayer player, UUID playerId, String playerName, String account)
  • Method Details

    • getType

      public TwoFactorType getType()
      Returns the two factor type.
    • getPlayer

      @Nullable public net.md_5.bungee.api.connection.ProxiedPlayer getPlayer()
      Return the player instance.

      It can be null if the account is added while the player is offline.

      Specified by:
      getPlayer in interface EventWithPlayer
    • getPlayerId

      public UUID getPlayerId()
      Returns the player's UUID.
      Since:
      API v5
    • getPlayerName

      public String getPlayerName()
      Returns the player's name.
    • getAccount

      public String getAccount()
      Return the twofactor account.