Template
Player
From Dogcraft Wiki
m (Added support for optional UUIDs and an optional Display name paramter for use in case of a username change.) |
m (Attempting to try out a optional alternate toggleable syntax for use when nickname was changed.) |
||
Line 25: | Line 25: | ||
"example": "5dfb0558-e306-44f4-bb9a-f9218d4eb787", | "example": "5dfb0558-e306-44f4-bb9a-f9218d4eb787", | ||
"type": "string" | "type": "string" | ||
}, | |||
"formerly": { | |||
"label": "Formerly", | |||
"description": "Toggle property for using the \"formerly\" syntax, useful in case of a username change. Requires both Username and Display name to be specified. This property will toggle if it has any content, regardless of what that is.", | |||
"example": "\"1\" or \"true\"", | |||
"type": "boolean" | |||
} | } | ||
}, | }, | ||
"format": "inline" | "format": "inline", | ||
}</templatedata></noinclude><includeonly><span style="white-space:nowrap;">{{#if: {{{uuid|}}}|https://dogcraft.net/img/mc/avatars/{{{uuid}}}?size=20.png|https://minotar.net/helm/{{{1|char}}}/20.png}}<nowiki></nowiki> ''{{#if: {{{2|}}}|{{{2|}}}|{{{1}}}}}''</span></includeonly> | "paramOrder": [ | ||
"1", | |||
"2", | |||
"uuid", | |||
"formerly" | |||
] | |||
}</templatedata></noinclude><includeonly><span style="white-space:nowrap;">{{#if: {{{uuid|}}}|https://dogcraft.net/img/mc/avatars/{{{uuid}}}?size=20.png|https://minotar.net/helm/{{{1|char}}}/20.png}}<nowiki></nowiki> ''{{#if: {{{formerly|}}}|{{{1}}} (formerly {{{2}}})|{{#if: {{{2|}}}|{{{2|}}}|{{{1}}}}}}}''</span></includeonly> |
Revision as of 00:11, 2 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: William278
Template Data
Displays a player head next to a player's username and italicizes the username.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Username | 1 | Player's in-game name | String | required |
Display name | 2 | 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) | String | optional |
UUID | uuid | Optional field for entering player minecraft UUID. This field does not replace Username, which still controls the name that appears on the page.
| String | optional |
Formerly | formerly | Toggle property for using the "formerly" syntax, useful in case of a username change. Requires both Username and Display name to be specified. This property will toggle if it has any content, regardless of what that is.
| Boolean | optional |