Class OnboardingService
java.lang.Object
com.gamersafer.minecraft.auth.paper.onboarding.OnboardingService
- All Implemented Interfaces:
com.gamersafer.minecraft.auth.common.onboarding.IOnboardingService
public class OnboardingService
extends Object
implements com.gamersafer.minecraft.auth.common.onboarding.IOnboardingService
Handles player onboarding functionality.
-
Constructor Summary
ConstructorsConstructorDescriptionOnboardingService(@NonNull GSAuthPaper plugin, @NonNull com.gamersafer.minecraft.auth.common.configuration.ServerConfiguration config) ConstructsOnboardingService. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Adds a player to the onboarding room.voiddisable()Disables the onboarding room.voidenable()Enables the onboarding room.booleaninRoom(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Returns true if the player is in the onboarding room (will return true for a player who is still going through the onboarding process).booleaninWorld(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Returns true if the player is in the onboarding room's world.booleanReturns true if the onboarding world is enabled.voidreload()Reloads the onboarding service's hologram and book handlers.voidremove(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Removes a player from the onboarding room.voidshowBook(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Opens the onboarding room book forplayer.@NonNull WorldLoaderReturns the world loader.
-
Constructor Details
-
OnboardingService
public OnboardingService(@NonNull GSAuthPaper plugin, @NonNull com.gamersafer.minecraft.auth.common.configuration.ServerConfiguration config) ConstructsOnboardingService.- Parameters:
plugin- the plugin
-
-
Method Details
-
enable
public void enable()Enables the onboarding room. Will attempt to load the onboarding room if the configuration allows it.If the onboarding room is disabled, then this method will immediately return.
-
disable
public void disable()Disables the onboarding room. -
reload
public void reload()Reloads the onboarding service's hologram and book handlers.- Specified by:
reloadin interfacecom.gamersafer.minecraft.auth.common.onboarding.IOnboardingService
-
add
public void add(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Adds a player to the onboarding room.- Specified by:
addin interfacecom.gamersafer.minecraft.auth.common.onboarding.IOnboardingService- Parameters:
player- the player
-
remove
public void remove(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Removes a player from the onboarding room.- Specified by:
removein interfacecom.gamersafer.minecraft.auth.common.onboarding.IOnboardingService- Parameters:
player- the player
-
inWorld
public boolean inWorld(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Returns true if the player is in the onboarding room's world.- Specified by:
inWorldin interfacecom.gamersafer.minecraft.auth.common.onboarding.IOnboardingService- Parameters:
player- the player- Returns:
- true or false
-
inRoom
public boolean inRoom(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Returns true if the player is in the onboarding room (will return true for a player who is still going through the onboarding process).- Specified by:
inRoomin interfacecom.gamersafer.minecraft.auth.common.onboarding.IOnboardingService- Parameters:
player- the player- Returns:
- true or false
-
showBook
public void showBook(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Opens the onboarding room book forplayer.- Specified by:
showBookin interfacecom.gamersafer.minecraft.auth.common.onboarding.IOnboardingService- Parameters:
player- the player
-
worldLoader
Returns the world loader.- Returns:
- the world loader
-
isEnabled
public boolean isEnabled()Returns true if the onboarding world is enabled.- Specified by:
isEnabledin interfacecom.gamersafer.minecraft.auth.common.onboarding.IOnboardingService- Returns:
- true or false
-