-
Notifications
You must be signed in to change notification settings - Fork 0
Hooking into AuthTools
AuthTools offers an API for performing actions and controlling them.
You can get AuthToolsApi
class by importing pavlyi.authtools.AuthToolsApi
.
getInstance()
- Gives u an whole access to the AuthTools (Main) class of the plugin.
getConfig()
- Gives u an access to the Config class.
getMessages()
- Gives u an whole access to the Messages class.
getMySQL()
- Gives u an whole access to the MySQL backend class.
getMongoDB()
- Gives u an whole access to the MongoDB backend class.
getYAMLConnection()
- Gives u an whole access to the YAML backend class.
getGoogleAuthenticator()
- Gives u an whole access to the GoogleAuthenticator class that is used.
getSpawnHandler()
- Gives u an whole access to the Spawn class where's the lobby and spawn set.
hasAnUpdate()
- Returns you a boolean status if the plugin needs an update.
isHooked()
- Returns you a boolean status if the plugin is hooked into nLogin, AuthMe or API.
getUser()
- Gives u an whole access to the Users class where you can set or get the settings of player.
isLogged()
- Returns you a boolean status if the player is logged in.
isRegistered()
- Returns you a boolean status if the player is registered.
setSpawn()
- Sets a spawn on the given location.
setLobby()
- Sets a lobby on the given location.
isLogged()
- Returns you a boolean status if the player is logged in.
isRegistered()
- Returns you a boolean status if the player is registered.
requireLogin()
- Makes player to login only if they do have 2FA enabled.
requireRegister()
- Makes player register only if they don't have 2FA enabled.
AuthToolsPlayerLoggedEvent
- This event calls when player log in.
AuthToolsPlayerRegisteredEvent
- This event calls when player registers.
AuthToolsPlayerRecovered2FAEvent
- This event calls when player recovers 2FA using /2fa recover
command.