Template

Player

From Dogcraft Wiki

mNo edit summary
mNo edit summary
Line 6: Line 6:
===Template Data===
===Template Data===
<templatedata>{
<templatedata>{
  "description": "Displays a player head next to a player's username and italicizes the username.",
"description": "Displays a player head next to a player's username and italicizes the username.",
  "params": {
"params": {
    "1": {
"1": {
      "label": "Username",
"label": "Username",
      "description": "Player's in-game name",
"description": "Player's in-game name",
      "type": "string",
"type": "string",
      "required": true
"required": true
    }
},
  }
"2": {
}</templatedata></noinclude><includeonly><span style="white-space:nowrap;">https://minotar.net/helm/{{{1|char}}}/20.png<nowiki></nowiki>&nbsp;''{{{1}}}''</span></includeonly>
"label": "Display name",
"description": "Name to display. Leave empty by defualt. Use only if the name to display differs from the username. (Useful in case of a username change)",
"type": "string",
"required": false
},
"uuid": {
"label": "UUID",
"description": "Optional field for entering player minecraft UUID. This field does not replace Username, which still controls the name that appears on the page.",
"example": "5dfb0558-e306-44f4-bb9a-f9218d4eb787",
"type": "string"
}
},
"format": "inline"
}</templatedata></noinclude><includeonly><span style="white-space:nowrap;">{{#if: {{{uuid}}}|https://dogcraft.net/img/mc/avatars/{{{uuid}}}?size=20|https://minotar.net/helm/{{{1|char}}}/20.png}}<nowiki></nowiki>&nbsp;''{{#if: {{{2}}}|{{{2}}}|{{{1}}}}}''</span></includeonly>

Revision as of 23:59, 1 January 2021

Player template

This template adds a head image next to a player's username. Add wherever you refer to a player name. Useful for helping identify players.

Example

{{Player|William278}} generates: https://dogcraft.net/img/mc/avatars/{{{uuid}}}?size=20 {{{2}}}

Template Data

Displays a player head next to a player's username and italicizes the username.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Username1

Player's in-game name

Stringrequired
Display name2

Name to display. Leave empty by defualt. Use only if the name to display differs from the username. (Useful in case of a username change)

Stringoptional
UUIDuuid

Optional field for entering player minecraft UUID. This field does not replace Username, which still controls the name that appears on the page.

Example
5dfb0558-e306-44f4-bb9a-f9218d4eb787
Stringoptional
This page was last modified on 1 January 2021, at 23:59. (4 months ago)