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
ConstructorDescriptionOnboardingService
(@NonNull GSAuthPaper plugin, @NonNull com.gamersafer.minecraft.auth.common.configuration.ServerConfiguration config) ConstructsOnboardingService
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Adds a player to the onboarding room.void
disable()
Disables the onboarding room.void
enable()
Enables the onboarding room.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).boolean
inWorld
(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Returns true if the player is in the onboarding room's world.boolean
Returns true if the onboarding world is enabled.void
reload()
Reloads the onboarding service's hologram and book handlers.void
remove
(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Removes a player from the onboarding room.void
showBook
(@NonNull com.gamersafer.minecraft.auth.common.abstraction.IPlayer player) Opens the onboarding room book forplayer
.@NonNull WorldLoader
Returns 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:
reload
in 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:
add
in 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:
remove
in 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:
inWorld
in 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:
inRoom
in 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:
showBook
in 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:
isEnabled
in interfacecom.gamersafer.minecraft.auth.common.onboarding.IOnboardingService
- Returns:
- true or false
-