NameRetriever

NameRetriever

Ever felt like Essential's /realname command just wasn't cutting it for you? NameRetriever extends the /realname command from Essentials to work for offline players. It also adds the /realnick command which allows players to get nicknames based off actual names.

NameRetriever will also allow many commands from various plugins to work with nicknames. It applies the realname command to the first parameter of any command listed in the config. For instance, if your favorite friend hjfdiwj_48728 has a nickname of ~jerry, you can't normally use /tpa jerry to help him out with his piston door, but with NameRetriever, now you can!

This plugin uses log files from Essentials to get nicknames and realnames of players by accessing log files from Essentials. If enabled in the config, this plugin uses a separate thread while doing this to prevent server lag.


Installation

  1. Download NameRetriever
  2. Copy to plugin directory
  3. Make appropriate permissions changes
  4. (Re)start server
  5. If you would like to change any config values, go to the newly created NameRetriever folder in the plugins folder and open config.yml in your favorite text editor.
  6. If you did anything interesting in step 5, restart or reload the server or simply type /nr reload in console (or in game if you have appropriate permissions)

This plugin is based around Essentials. If you use another plugin to give nicknames to players this plugin will not be able to get usernames or nicknames of offline players but should function normally for online players. It is recommended you set the showStatus config value to false if you are not using Essentials for nicknames


Commands

/realname -- Shows the realname of a player based on their displayname. If no one is found with a matching displayname, it shows the realname and nickname of a player based on their real name Aliases: /rname, /name

/realnick -- shows the displayname of a player based on their real name Alias: /rnick

/nameretriever reload -- reloads the config file

/nameretriever version -- shows the current version

/nameretriever help -- shows help for the plugin

Note: /nr is an alias for /nameretriever


Permissions

nameretriever.realname -- Allows use of the /realname command

nameretriever.realnick -- Allows use of the /realnick command

nameretriever.reload -- Allows use of the /nameretriever reload command

nameretriever.version -- Allows use of the /nameretriever version command

nameretriever.help -- Allows use of the /nameretriever help command


Config

showStatus: -- When true, the online or offline status of a player is displayed along with their real- and nick-names

getOfflineAlways: -- When true, the plugin searches through offline players even when it finds online players that match the parameter in the /realname and /realnick commands

nickIndicatorChar: -- The character to display before someone's nickname. This only effects results returned via the realname and realnick commands. By default it is set to ~ to match Essentials' default

useAsync: -- Set whether the plugin should make asynchronous calls when accessing nicknames stored on disk. It is recommended this be turned on especially on large servers to prevent server lag. The more players who have played on a server, the more time accessing the disk will take

cmdRegex1: -- Regular expression for matching all commands that should have their first argument replaced by the "realname" of that argument

cmdRegex2: -- Regular expression for matching all commands that should have their frist two arguments replaced by the "realnames" of theose arguments

Regular Expressions Explained

Even if you've never used Regular Expressions before, it is fairly easy to modify the list of commands that you want NameRetriever to apply the /realname command to if you are very careful. It's always a good idea to copy the default regular expression and paste it in a comment in the config file or in a blank Notepad/TextEdit/gedit document just in case you break it. Example regular expression for NameRetriever: ^\/(?i)(tp|tphere|tpa|tpahere) Unless you really know what you are doing, do not touch the beginning of the expression. If you want to modify which commands have the /realname command applied to their parameter(s), just add or remove commands from the final set of parentheses. The format is for the final set of parentheses is always (<cmd1>|<cmd2>|<cmd3>| ... |<cmdEtc>). As long as this format is retained, you shouldn't break the regular expression


API

NameRetriever has an API for developers to use in their own plugins. See the Readme on GitHub for a full explanation of how the API works

Source

This plugin is open source. You can find the source code on GitHub here


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    66529
  • Created
    Sep 30, 2013
  • Last Released File
    Jan 18, 2014
  • Total Downloads
    1,065
  • License

Categories

Members

Recent Files