Creating fake players - montlikadani/TabList GitHub Wiki

Content

About

Fake players are basically non-live players that can be created within the server and are only visible in the player list (ie tablist). Citizens NPCs cannot be created with this plugin, as it is not a tablist-related functionality. This feature was added only as a test or for those who want it.

With this plugin, you can currently only set skin, ping (latency) and display name. There are no more customization options that vanilla minecraft has. To set a fake player skin, you can use the information of the selected player that will be displayed on the sessionserver client, which will be the UUID or the name of the player. If no response is displayed based on either the player name or the UUID, it means that no such player is registered. If it gave a response, it should look something like this from web view.

Currently, only the following URLs are supported that can retrieve registered player information:

When setting up a skin, these will be called on an asynchronous thread, which ensures that no server freezes occur during execution. However, the retrieval may take time from the web server, depending on how much it is under load. If a web server is unable to send an answer within 5 seconds, it automatically jumps to the next web server URL and retrieves it again. On the other hand, if they are all under load, nothing will be returned as a response, so you won't be able to set a skin for the fake player.

Notices

  • The resource does not set a limit on how many fake players you can create. You can create as many as the client allows.
  • Make sure you have an online minecraft client when setting a skin, as it does not work on offline clients neither in offline servers.
  • The resource sets a maximum limit of how many times you can request a skin data from web requests, the value is 100, if you reach this amount you won't be able to request any more again. This is to avoid rate limiting in web clients.

Creating fake player

To begin using the commands below make sure you have enabled the option in config.yml:

fake-players:
  enabled: true

Without enabling this all the commands is disabled and fake players won't be displayed in game.


/tl fakeplayers add <name>

This will create a fake player with default values, no skin and -1 ping value. You can then modify this existing fake player using the commands listed under this. The execution of these commands is optional, so you can leave it in this state.


Renaming an existing one

/tl fakeplayer rename <oldName> <newName>

This will change the existing fake player's old name to a specified new name as well as change it in the configuration. This will not affect the display name.


Changing the display name

/tl fakeplayers setdisplayname <name> "new name"

This will change the fake player's display name on the tablist. In it you can use placeholders, spaces (" " in quotation marks) and colour formatting.


Changing ping value

/tl fakeplayers setping <name> <value>

This will change the ping (latency) value and will also affect the appearance of the bars:

Value Result
-1 or less ping_bar_-1
0 - 149 ping_bar_0
150 - 299 ping_bar_150
300 - 599 ping_bar_300
600 - 999 ping_bar_600
1000+ ping_bar_1000

Changing skin

/tl fakeplayers setskin <name> <playerName>

This will makes a safe (non blocking) web request asynchronously to retrieve player's skin information from the specified player name. The skin will be set in the following cases:

  • If it was never on the server, but can be found based on the web request, the skin will be set
  • If it was played in the server, but can not be found from web request, the default skin will be set (this may be different if you change it with e.g. SkinsRestorer resource)
  • If the player never played in the server, nor can not be found through a web server request, the skin will not be set

/tl fakeplayers setskin <name> <playerName> --force

This first performs the aforementioned asynchronous task to make sure no such player exists, if it doesn't, it retrieves the player's information from the server's world files if they've ever played on the server. If the specified player never played on the server the skin won't be set.

/tl fakeplayers setskin <name> <uuid>

By executing this command, the player information based on the specified UUID is retrieved once based on a web server request, so it will be used later to avoid continuous web requests.

Notices

  • Maximum web requests value is 100, if you reach this amount the plugin won't request any more skin data.

Removing fake player

/tl fakeplayers remove <name>

This removes the fake player from both the tab list and the configuration file and is irreversible.

⚠️ **GitHub.com Fallback** ⚠️