Skip to content

Local Nicknames

Oliver Martin edited this page Jul 15, 2020 · 14 revisions

While there is a standard way for spigot plugins to make their set prefixes etc. available for MultiChat to use (Vault), there is no set way for them to do this with nicknames. As such, it is impossible for MultiChat to use the nicknames set by other plugins.

MultiChat hence features its own nickname command which can act as a replacement for the nickname command in plugins like Essentials. This command is part of MultiChatLocal, the local part of MultiChat that runs on your spigot/sponge server rather than on the proxy. This is because it is designed to emulate your normal nicknaming system.

IF YOU ARE LOOKING FOR THE SQLITE AND MYSQL OPTIONS - CLICK HERE


The /nick command allows you to give a player a nickname. For example:

/nick Revilo410 Revilo

This will make my name in chat display as Revilo instead of Revilo410. To disable it we can use:

/nick Revilo410 off

Permission (to set your own nickname): multichatlocal.nick.self

Permission (to set others nicknames): multichatlocal.nick.others

Permission (to be able to impersonate another players real name): multichatlocal.nick.impersonate

Other permissions:

multichatlocal.nick.special Ability to use special characters in nicknames (anything other than "^[a-zA-Z0-9&_]+$")

multichatlocal.nick.color/colour.simple (Ability to use colour codes in nicknames) (&a &b &1 &2 etc.)

multichatlocal.nick.color/colour.hex (Ability to use RGB colour codes in nicknames) (&#abcdef, &a &b &1 &2 etc.)

multichatlocal.nick.format (Ability to use format codes in nicknames) (&l &o etc.)

multichatlocal.nick.anylength (Allows nickname longer than the max length or shorter than the min length)


The /realname command allows a player to find the real name of someone with a nickname.

/realname <nickname>

Permission: multichatlocal.realname

The realname command also supports partial matches (if you have the appropriate permission). These are by default limited to 10 results, but you can list ALL the results that match if you have the right permission. The reason this limit is in place by default is that the task could be computationally expensive, and you dont want players spamming /realname .* and listing everyone on your entire network's nickname...

multichatlocal.realname.partial (Permission to allow partial nicknames to be found for a /realname query)

multichatlocal.realname.nolimit (Allows ALL matches for a realname query to be shown instead of limit 10)

How do partial matches work in /realname?

Assume I have 3 players on my servers with nicknames, "CrafterBoy, MinerGirl and MinecraftPlayer123".

If I run /realname CrafterBoy it will return the exact match for this nickname.

If I run /realname Crafter then MultiChat will say no exact match could be found, but will list people with possible matches, in this case it will be 'CrafterBoy'.

If I run /realname m then the plugin will again say no exact matches could be found, but will list MinerGirl and MinecraftPlayer123 as partial matches because they both start with 'm'.

The way this search for partial matches works is as follows:

  • MultiChat searches for any nicknames starting with the search term
  • If no matches were found then MultiChat searches for nicknames containing the search term
  • If still no match was found, then MultiChat will treat the search term as a regular expression (regex) and see if it finds anyone that way.

This means that the most relevant results will always be displayed. If you have players with nickname MinecraftPlayer123, and IPlayMinecraft, then doing /realname Minecraft will return the former. This makes the most sense! If you were searcing for the latter player, you would likely not search for "Minecraft" in /realname!


The /username command allows a player to find the username of someone if you cannot remember it exactly.

/username <query>

Permission: multichatlocal.username

The username command also supports partial matches (if you have the appropriate permission). These are by default limited to 10 results, but you can list ALL the results that match if you have the right permission. The reason this limit is in place by default is that the task could be computationally expensive, and you dont want players spamming /username .* and listing everyone on your entire network's nickname...

multichatlocal.username.partial (Permission to allow partial names to be found for a /username query)

multichatlocal.username.nolimit (Allows ALL matches for a name query to be shown instead of limit 10)

How do partial matches work in /username?

Exactly the same as for /realname above. Please see that section!


File Based Storage vs SQL Storage (SQLite & MySQL)

MultiChatLocal offers 3 formats for storing nickname data: File based, SQLite and MySQL.

By default the nicknames are stored in a single file in MultiChat's config folder. However, many users wished for a more optimised setup, so now (as of MultiChat 1.8) you can choose to store this nickname data in SQLite or MySQL. SQLite creates a local database file where data is stored. MySQL requires you to have an external MySQL server to connect to. The details for connecting to your server are in localconfig.yml.

The benefit of using a MySQL server is that you can sync your nickname data across all your local servers. This means that multiple spigot and sponge servers can share the same nicknames, and if you set a nickname on one server then it will be mirrored on all the others.

In order to convert existing file based nickname storage to SQL storage you need to run the multichatlocal migratetosql command from the Spigot/Sponge console. This goes through each user individually and adds their nicknames to your database. In order for this to work correctly an existing nickname file needs to be in the multichat config folder, and the server must be restarted with nickname_sql enabled.