You are viewing an older version of the site. Click here to view
the latest version of this page. (This may be a dead link, if so, try the root page of the docs
here.)
== player ==
[uuid] |- ! scope="row" | Throws | [[../objects/com.commandhelper.PlayerOfflineException|com.commandhelper.PlayerOfflineException]] |- ! scope="row" | Since | 3.0.1 |- ! scope="row" | Restricted |
Returns a player's name. If a string is specified, it will attempt to find a complete match for a partial name. If no string is specified, the current player is returned. UUIDs are also accepted for this and other functions that apply to online players. If the command is being run from the console, then the string '~console' is returned. If the command came from a CommandBlock, the block's name prefixed with # is returned. If the command is coming from elsewhere, returns a string chosen by the sender of this command (or null). Note that most functions won't support console or block names (they'll throw a PlayerOfflineException), but you can use this to determine where a command is being run from.
=== Vital Info ===
{| style="width: 40%;" cellspacing="1" cellpadding="1" border="1" class="wikitable"
|-
! scope="col" width="20%" |
! scope="col" width="80%" |
|-
! scope="row" | Name
| player
|-
! scope="row" | Returns
| string
|-
! scope="row" | Usages
| [playerName] [uuid] |- ! scope="row" | Throws | [[../objects/com.commandhelper.PlayerOfflineException|com.commandhelper.PlayerOfflineException]] |- ! scope="row" | Since | 3.0.1 |- ! scope="row" | Restricted |
No
|-
! scope="row" | Optimizations
| None
|}
=== Usages ===
player([playerName])
player([uuid])=== Examples === Sorry, there are no examples for this function! :(
Find a bug in this page? Edit this page yourself, then submit a pull request. (Note this page is automatically generated from the documentation in the source code.)