### Configure nLogin database settings Source: https://docs.nickuc.com/nlogin/config/storage Example configuration block for the nLogin config.yml file to connect to a remote database. ```yaml # ___ _ _ # / \__ _| |_ __ _| |__ __ _ ___ ___ # / /\ / _` | __/ _` | '_ \ / _` / __|/ _ \ # / /_// (_| | || (_| | |_) | (_| \__ \ __/ # /___,' \__,_|\__\__,_|_.__/ \__,_|___/\___| # Database settings. database: # Sets the type of database used. # # - Options available: # |=> MariaDB # |=> MySQL # |=> SQLite type: MariaDB remote: # Defines MariaDB/MySQL information. # - Tutorial for installation: https://docs.nickuc.com/nlogin/mysql hostname: "localhost:3306" database: "nlogin" username: "root" password: "" # Set the connection properties. # - Don't change this information if you don't know what you are doing! properties: #useSSL: false #sslMode: disable #verifyServerCertificate: false useUnicode: true characterEncoding: "utf8" ``` -------------------------------- ### Configure Backend Authentication Servers Source: https://docs.nickuc.com/nlogin/proxy Define the list of servers where nLogin is installed to handle authentication. Ensure check-ack-message is disabled if using non-Spigot based servers. ```yaml # ___ _ _ # / __\ __ _ ___| | _____ _ __ __| | # /__\/// _` |/ __| |/ / _ \ '_ \ / _` | # / \/ \ (_| | (__| < __/ | | | (_| | # \_____/\__,_|\___|_|\_\___|_| |_|\__,_| # Settings related to the backend servers. backend: # Sets the list of authentication servers. # - You must enter this list ALL servers that nLogin is installed on. # - Most servers use either an authentication server or a main lobby. # - For more information, go to the tutorial: # ==> https://docs.nickuc.com/nlogin/proxy auth-servers: - 'lobby' # Defines whether the proxy should check if authentication servers are properly configured. # - If you are using a server without nLogin (e.g. limbo servers not based on Spigot) # it is recommended to disable this option. check-ack-message: true ``` -------------------------------- ### Initialize MySQL session and database Source: https://docs.nickuc.com/nlogin/config/storage Commands to set the storage engine and create a database with appropriate character sets for different MySQL versions. ```sql SET storage_engine=InnoDB ``` ```sql CREATE DATABASE CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci ``` ```sql CREATE DATABASE CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ``` -------------------------------- ### Configure Backend Acknowledgement Source: https://docs.nickuc.com/nlogin/config/template Toggle the proxy check for authentication server configuration. ```yaml # Defines whether the proxy should check if authentication servers are properly configured. check-ack-message: true ``` -------------------------------- ### Main Configuration Template Source: https://docs.nickuc.com/nlogin/config/template The primary configuration file for nLogin. Defines language settings, database type, and connection pool parameters. ```yaml #################################################################################################### # +----------------------------------------------------------------------------------------------+ # # | __ _ | # # | _ __ / / ___ __ _(_)_ __ | # # | | '_ \ / / / _ \ / _` | | '_ \ | # # | | | | / /__| (_) | (_| | | | | | | # # | |_| |_\____/\___/ \__, |_|_| |_| | # # | |___/ | # # | | # # | A practical, secure and friendly authentication plugin | # # | | # # | © 2024 - Powered by nickuc.com | # # | | # # | | # # | For a better understanding of this file see our documentation: | # # | ==> https://docs.nickuc.com/nlogin/ | # # | | # # | New options are not automatically added in this file. Default values are used | # # | if an option is not found. | # # +----------------------------------------------------------------------------------------------+ # #################################################################################################### # Set the version of the file. language-version: 2 # Sets the debugging mode. # - This option is used to find problems in the plugin. debug: false # Set the language of the plugin # # - Available translations: # # |=> Arabic: messages_ar.yml # |=> Bulgarian: messages_bg.yml # |=> Chinese: messages_cn.yml # |=> Czech: messages_cz.yml # |=> German: messages_de.yml # |=> English: messages_en.yml # |=> Spanish: messages_es.yml # |=> French: messages_fr.yml # |=> Hungarian: messages_hu.yml # |=> Indonesian: messages_id.yml # |=> Italian: messages_it.yml # |=> Lithuanian: messages_lt.yml # |=> Polish: messages_pl.yml # |=> Portuguese: messages_br.yml # |=> Romanian: messages_ro.yml # |=> Russian: messages_ru.yml # |=> Turkish: messages_tr.yml # |=> Ukrainian: messages_ua.yml # |=> Vietnamese: messages_vn.yml # |=> Other languages: https://github.com/nickuc/OpeNLogin/blob/master/docs/lang.md # # - When changing the language, the current file can be reset. language-file: "messages_en.yml" # ___ _ _ # / \__ _| |_ __ _| |__ __ _ ___ ___ # / /\ / _` | __/ _` | '_ \ / _` / __|/ _ \ # / /_// (_| | || (_| | |_) | (_| \__ \ __/ # /___,' \__,_|\__\__,_|_.__/ \__,_|___/\___| # Database settings. database: # Sets the type of database used. # # - Options available: # |=> MariaDB # |=> MySQL # |=> SQLite type: SQLite remote: # Defines MariaDB/MySQL information. # - Tutorial for installation: https://docs.nickuc.com/nlogin/mysql hostname: "localhost:3306" database: "nLogin" username: "root" password: "" # Set the connection properties. # - Don't change this information if you don't know what you are doing! properties: #useSSL: false #sslMode: disable #verifyServerCertificate: false useUnicode: true characterEncoding: "utf8" # Defines the connection pool settings. # - Don't change this information if you don't know what you are doing! pool-settings: maximum-pool-size: 10 minimum-idle: 10 maximum-lifetime: 1800000 # 30 minutes connection-timeout: 5000 # 5 seconds table: account: # Sets the name of the nLogin accounts table. ``` -------------------------------- ### Configure Premium and Session Settings Source: https://docs.nickuc.com/nlogin/config/template Settings for automatic premium authentication and login session persistence. ```yaml premium: # Defines whether premium players should authenticate automatically. # - You can change this setting freely: already registered users # will NOT be vulnerable by this change enable: true # Defines whether premium players should skip registration. # - It is recommended to disable this option if you use player passwords # in a web integration (e.g. server site). skip-register: true session: # Defines whether login sessions will be used. # - Authentication will be ignored if the player logs in at the timeout # and continues using the same IP address. enable: true # Sets the duration (in minutes) of login sessions. # => Very long session times may open vulnerabilities if the player's IP # is public (proxies, public VPNs, shared networks) # or if it switches too quickly (on ISPs with dynamic IP). # # - To make a session permanent use the value 0. However, this is inadvisable. duration: 5 ``` -------------------------------- ### Configure allowed authentication tokens Source: https://docs.nickuc.com/nlogin/proxy/bungeeguard Add the proxy-generated tokens to the backend server's configuration file to authorize connections. ```yaml # Allowed authentication tokens. allowed-tokens: - "YOUR TOKEN HERE" ``` -------------------------------- ### Configure Post-Authentication Redirection Source: https://docs.nickuc.com/nlogin/proxy Set up server redirection rules to forward players to specific lobbies after they successfully authenticate. ```yaml # ___ _ _ # / __\ __ _ ___| | _____ _ __ __| | # /__\/// _` |/ __| |/ / _ \ '_ \ / _` | # / \/ \ (_| | (__| < __/ | | | (_| | # \_____/\__,_|\___|_|\_\___|_| |_|\__,_| # Settings related to the backend servers. backend: # Sets the list of authentication servers. # - You must enter this list ALL servers that nLogin is installed on. # - Most servers use either an authentication server or a main lobby. # - For more information, go to the tutorial: # ==> https://docs.nickuc.com/nlogin/proxy auth-servers: - 'auth' # Defines whether the proxy should check if authentication servers are properly configured. # - If you are using a server without nLogin (e.g. limbo servers not based on Spigot) # it is recommended to disable this option. check-ack-message: true # __ _ _ _ # /__\ ___ __| (_)_ __ ___ ___| |_ # / \/// _ \/ _` | | '__/ _ \/ __| __| # / _ \ __/ (_| | | | | __/ (__| |_ # \/ \_/\___|\__,_|_|_| \___|\___|\__| # Server redirection settings. redirect: # Defines whether the redirection of the first server should be overwritten by nLogin. # - This option prevents players from bypassing the authentication server # and restores the first server provided by the proxy. override-first-server: true # Defines whether the plugin should redirect players to the last connected server. # - If the last connected server no longer exists, a random server from the "after-auth.servers" option will be chosen. redirect-to-last-server: false # Sets the waiting time (in milliseconds) when switching the server. connect-delay: 500 # Sets the waiting time (in milliseconds) to reconnect to the server when the connection fails. retry-delay: 5000 after-auth: # Defines whether players should be automatically forwarded to other servers after authentication. enabled: false # Defines which servers the players should be forwarded to. # - When entering more than one item, the server will be chosen randomly. servers: - "lobby-1" - "lobby-2" ``` -------------------------------- ### Configure nLogin Proxy Settings Source: https://docs.nickuc.com/nlogin/config/template Complete configuration template for nLogin proxy, including backend server lists and redirection rules. ```yaml #################################################################################################### # +----------------------------------------------------------------------------------------------+ # # | __ _ | # # | _ __ / / ___ __ _(_)_ __ | # # | | '_ \ / / / _ \ / _` | | '_ \ | # # | | | | / /__| (_) | (_| | | | | | | # # | |_| |\____/\___/ \__, |_|_| |_| | # # | |___/ | # # | | # # | A practical, secure and friendly authentication plugin | # # | | # # | © 2024 - Powered by nickuc.com | # # | | # # | | # # | For a better understanding of this file see our documentation: | # # | ==> https://docs.nickuc.com/nlogin/ | # # | | # # | New options are not automatically added in this file. Default values are used | # # | if an option is not found. | # # +----------------------------------------------------------------------------------------------+ # #################################################################################################### # Set the version of the file. language-version: 2 # ___ _ _ # / __\ __ _ ___| | _____ _ __ __| | # /__\/// _` |/ __| |/ / _ \ '_ \ / _` | # / \/ \ (_| | (__| < __/ | | | (_| | # \_____/\__,_|\___|_|\_\___|_| |_|\__,_| # Settings related to the backend servers. backend: # Sets the list of authentication servers. # - You must enter this list ALL servers that nLogin is installed on. # - Most servers use either an authentication server or a main lobby. # - For more information, go to the tutorial: # ==> https://docs.nickuc.com/nlogin/proxy auth-servers: - 'lobby' # Defines whether the proxy should check if authentication servers are properly configured. # - If you are using a server without nLogin (e.g. limbo servers not based on Spigot) # it is recommended to disable this option. check-ack-message: true # __ _ _ _ # /__\ ___ __| (_)_ __ ___ ___| |_ # / \/// _ \/ _` | | '__/ _ \/ __| __| # / _ \ __/ (_| | | | | __/ (__| |_ # \/ \_/\___|\__,_|_|_| \___|\___|\__| # Server redirection settings. redirect: # Defines whether the redirection of the first server should be overwritten by nLogin. # - This option prevents players from bypassing the authentication server # and restores the first server provided by the proxy. override-first-server: true # Sets the waiting time (in milliseconds) when switching the server. connect-delay: 500 # Sets the waiting time (in milliseconds) to reconnect to the server when the connection fails. retry-delay: 5000 last-server: # Defines whether the plugin should redirect players to the last connected server. # - If the last connected server no longer exists, a random server from the "after-auth.servers" option will be chosen. enable: false # Defines which servers will be ignored by the redirection. ignored: [] after-auth: # Defines whether players should be automatically forwarded to other servers after authentication. enable: false # Defines which servers the players should be forwarded to. # - When entering more than one item, the server will be chosen randomly. servers: - "lobby1" - "lobby2" ``` -------------------------------- ### Add nLogin API via Gradle Source: https://docs.nickuc.com/nlogin/development/usage Configure the repository and dependency in your build.gradle file to include the nLogin API. ```groovy repositories { maven { url = uri('https://repo.nickuc.com/maven-releases/') } } dependencies { compileOnly('com.nickuc.login:api:10.4') } ``` -------------------------------- ### nLogin Email Configuration Template Source: https://docs.nickuc.com/nlogin/config/template The YAML configuration structure for setting up SMTP credentials and email-related account options. ```yaml #################################################################################################### # +----------------------------------------------------------------------------------------------+ # # | __ _ | # # | _ __ / / ___ __ _(_)_ __ | # # | | '_ \ / / / _ \ / _` | | '_ \ | # # | | | | / /__| (_) | (_| | | | | | | # # | |_| |_\____/\___/ \__, |_|_| |_| | # # | |___/ | # # | | # # | A practical, secure and friendly authentication plugin | # # | | # # | © 2024 - Powered by nickuc.com | # # | | # # | | # # | For a better understanding of this file see our documentation: | # # | ==> https://docs.nickuc.com/nlogin/ | # # | | # # | New options are not automatically added in this file. Default values are used | # # | if an option is not found. | # # +----------------------------------------------------------------------------------------------+ # #################################################################################################### # Set the version of the file. language-version: 2 # Defines whether the email can be used as a second factor. enable: false authentication: # Email email: "yourserver@domain.com" # User user: "" # Password password: "" # Charset charset: "UTF-8" # Mimetype mimetype: "text/html" # SMTP host host: "smtp.gmail.com" # SMTP port port: 587 # Encryption # # - Options available: # |=> AUTO # |=> TLS # |=> SSL encryption: auto # Debug mode debug: false options: link-required: # Sets whether linking an email will be required to authenticate. enable: false # Sets whether premium players will also need to link an email to authenticate themselves. required-for-premium: true # Sets the maximum number of accounts that can have the same email linked. account-limit: 1 # Defines whether the link should be recommended to players. recommend-linking: true # Defines whether a new password should be created after the account recovery process. # - If this option is disabled, a random password will be set. force-password-update: false # Defines the list of allowed domains. # - If no domain is defined, all domains will be allowed. allowed-domains: [] # Defines the list of denied domains. denied-domains: [] ``` -------------------------------- ### Add nLogin API via Maven Source: https://docs.nickuc.com/nlogin/development/usage Include the repository and dependency blocks in your pom.xml file to access the nLogin API. ```xml nickuc-repo https://repo.nickuc.com/maven-releases/ com.nickuc.login api 10.4 provided com.nickuc.login api 10.4 javadocs ``` -------------------------------- ### Join Configuration Source: https://docs.nickuc.com/nlogin/config/template Manages chat cleanup and join message visibility upon player connection. ```yaml join: # Sets whether the chat should be cleaned upon joining the server. clean-chat-on-join: true # Sets whether the join message will be removed. remove-join-message: true ``` -------------------------------- ### Discord Configuration Template Source: https://docs.nickuc.com/nlogin/config/template The primary configuration file for enabling and customizing Discord integration features. ```yaml #################################################################################################### # +----------------------------------------------------------------------------------------------+ # # | __ _ | # # | _ __ / / ___ __ _(_)_ __ | # # | | '_ \ / / / _ \ / _` | | '_ \ | # # | | | | / /__| (_) | (_| | | | | | | # # | |_| |_\____/\___/ \__, |_|_| |_| | # # | |___/ | # # | | # # | A practical, secure and friendly authentication plugin | # # | | # # | © 2024 - Powered by nickuc.com | # # | | # # | | # # | For a better understanding of this file see our documentation: | # # | ==> https://docs.nickuc.com/nlogin/ | # # | | # # | New options are not automatically added in this file. Default values are used | # # | if an option is not found. | # # +----------------------------------------------------------------------------------------------+ # #################################################################################################### # Set the version of the file. language-version: 2 # Defines whether Discord can be used as a second factor. enable: false authentication: # Defines the token used in the Discord API. # # - For more information, please access the documentation: # * https://docs.nickuc.com/nlogin/discord # token: "" options: link-required: # Sets whether linking a Discord account will be required to authenticate. enable: false # Sets whether premium players will also need to link a Discord account to authenticate. required-for-premium: true # Sets the maximum number of accounts that can have the same Discord linked. account-limit: 1 # Defines whether the link should be recommended to players. recommend-linking: true # Defines whether a new password should be created after the account recovery process. # - If this option is disabled, a random password will be set. force-password-update: false # Sets the invitation URL of the Discord server. # - This option is required to complete a link. invite-url: "SERVER INVITATION" # Sets the bot status message. presence: "" ``` -------------------------------- ### Configure Advanced Features Source: https://docs.nickuc.com/nlogin/config/template Settings for unrestricted names, inventory locking, and post-authentication command execution. ```yaml advanced: unrestricted: # Defines the nicknames that will skip the authentication process. # # - This option can be useful for MODS or plugins that spoof # the behavior of a player. # # - Examples: # - '[ThaumcraftTablet]' # - '[BuildCraft]' # - 'ComputerCraft' # # => Use this feature at your own risk. unrestricted-names: [] # Sets the name of the inventories that will not be locked before login. # - If you are a developer, it is best to use a higher priority for # your inventory event (e.g. HIGH or HIGHEST), and then remove # the nLogin cancel - "Event#setCancelled(false)" unrestricted-inventories: [] # Client (player) related resources. client: # Define whether the nLogin language should be adapted to the Minecraft language. language-by-client: false # Defines the list of commands to be executed after registering. # # - Options available: # |=> @console: executes the command on the console. # |=> @delay