Class BaseOnboardingService

java.lang.Object
com.gamersafer.minecraft.auth.common.onboarding.BaseOnboardingService
All Implemented Interfaces:
IOnboardingService

public class BaseOnboardingService extends Object implements IOnboardingService
The base implementation of the onboarding service. Has no effect on the player.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(@NonNull IPlayer player)
    Adds the player to the onboarding room.
    boolean
    inRoom(@NonNull IPlayer player)
    Returns true if the player is in the onboarding room.
    boolean
    inWorld(@NonNull IPlayer player)
    Returns true if player is in the onboarding world.
    boolean
    Returns true if the onboarding room is enabled.
    void
    Reloads the onboarding service.
    void
    remove(@NonNull IPlayer player)
    If player is in the onboarding room, then this method will remove the player from the room.
    void
    showBook(@NonNull IPlayer player)
    Shows the onboarding book to player.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseOnboardingService

      public BaseOnboardingService()
  • Method Details

    • add

      public void add(@NonNull IPlayer player)
      Description copied from interface: IOnboardingService
      Adds the player to the onboarding room.
      Specified by:
      add in interface IOnboardingService
      Parameters:
      player - the player
    • remove

      public void remove(@NonNull IPlayer player)
      Description copied from interface: IOnboardingService
      If player is in the onboarding room, then this method will remove the player from the room.

      Otherwise, this method will do nothing.

      Specified by:
      remove in interface IOnboardingService
      Parameters:
      player - the player
    • showBook

      public void showBook(@NonNull IPlayer player)
      Description copied from interface: IOnboardingService
      Shows the onboarding book to player.
      Specified by:
      showBook in interface IOnboardingService
      Parameters:
      player - the player
    • inRoom

      public boolean inRoom(@NonNull IPlayer player)
      Description copied from interface: IOnboardingService
      Returns true if the player is in the onboarding room.

      If the player is in the onboarding world, but not currently onboarding, then this will return false.

      Use IOnboardingService.inWorld(IPlayer) to check if they are in the world.

      Specified by:
      inRoom in interface IOnboardingService
      Parameters:
      player - the player
      Returns:
      true or false
    • inWorld

      public boolean inWorld(@NonNull IPlayer player)
      Description copied from interface: IOnboardingService
      Returns true if player is in the onboarding world.

      Note that this method will return true if the player is in the world, regardless of their status with the onboarding room.

      Specified by:
      inWorld in interface IOnboardingService
      Parameters:
      player - the player
      Returns:
      true or false
    • isEnabled

      public boolean isEnabled()
      Description copied from interface: IOnboardingService
      Returns true if the onboarding room is enabled.
      Specified by:
      isEnabled in interface IOnboardingService
      Returns:
      true or false
    • reload

      public void reload()
      Description copied from interface: IOnboardingService
      Reloads the onboarding service.
      Specified by:
      reload in interface IOnboardingService