🏷️ Username Appender
Set up an appendix for users and avoid nickname collisions.
The system without prefixes/suffixes can be used!
This decision is recommended if you don't want to use different IPs for your server or simply if you don't have a domain for your server.
To do this, disable the premium.username-appender
option in your nLogin configuration.
How it works
The username appender is a premium feature that adds a configurable prefix/suffix to offline and/or premium players.
Server with the suffix *
for offline players.
Advantages
-
Prevent offline players from restricting the access of premium players. For example, consider that some offline player has accessed the server and registered using the nickname "Notch". The premium player "Notch" then accesses the server. In this situation, the premium player won't be able to access his account, because it was registered before and him doesn't know the registered password.
With the username appender system, the offline player would be registered as "Notch+" and the premium player as "Notch", avoiding collision problems.
-
No need to use the
/premium
and/offline
commands. With the username appender system, offline and premium players would be differentiated by the connection IP. There is no need to use these commands. -
No data migration problems after changing nickname. With the username appender system, premium players would never have problems migrating their data. A migration problem could be caused in the previous system by a UUID without this functionality, for example.
Requirements
- You must have a registered domain. Numeric IPs do not support this feature.
- You will need to point at least 2 IPs (sub-domains) to your server. Examples: premium.yourserver.com and yourserver.com.
- You can't use the same IP for offline and premium players.
- You need to have nLogin Premium installed.
Pointing the IP
In this example, for premium players we will use the IP premium.yourserver.com
, without any appendix, and for offline players, the IP yourserver.com
with the suffix "+".
Configuration
Go to the file /plugins/nLogin/config.yml
. Look for the "premium.username-appender" section and configure the chosen IPs.
# ___ _
# / _ \_ __ ___ _ __ ___ (_)_ _ _ __ ___ __/\__
# / /_)/ '__/ _ \ '_ ` _ \| | | | | '_ ` _ \ \ /
# / ___/| | | __/ | | | | | | |_| | | | | | | /_ _\
# \/ |_| \___|_| |_| |_|_|\__,_|_| |_| |_| \/
# Paid features of the plugin (premium version).
premium:
username-appender:
# Sets whether the plugin should add an extension to the nickname.
# - This feature is recommended to differentiate premium players from offline players.
#
# - You can change this option freely: players' data will not be lost.
#
# - For more information, please access the documentation:
# * https://docs.nickuc.com/nlogin/username-appender
#
enabled: true
premium:
# Sets the prefix/suffix added to premium player nicknames.
username-appendix: ""
# Sets the position of the appendix added to premium player nicknames.
#
# - Options available:
# |=> PREFIX (before nickname)
# |=> SUFFIX (after nickname)
#
position: "suffix"
# Defines the list of domains that will be used to identify premium players.
# - Regex expressions are accepted.
# - The domains to be checked will always be in lower case.
domains:
- "premium.myserver.com"
offline:
# Sets the prefix/suffix added to offline player nicknames.
username-appendix: "+"
# Sets the position of the appendix added to offline player nicknames.
#
# - Options available:
# |=> PREFIX (before nickname)
# |=> SUFFIX (after nickname)
#
position: "suffix"
# Defines the list of domains that will be used to identify offline players.
# - Regex expressions are accepted.
# - The domains to be checked will always be in lower case.
domains:
- "myserver.com"
Done! Now all you have to do is share the two IPs with your players.
Need help? Contact our support team if you still have questions.