Player - Jenya705/mcapi GitHub Wiki

Player object represents online player, inherits from offline player and command sender

Fields

Field name Field description
uuid Player unique id
location Player location
name Player name
type Player type

Methods

Method name Method description
sendMessage(message) Sends message to a player
kick(reason) Kicks a player
ban(reason) Bans a player
hasPermission(name) Checks if player has permission

Concepts

Player id

Player id is name or uuid of a player. UUID can be typed without dashes

Player selector

  • @a - all online players selector
  • @r - random player selector
  • @l - all online players which are linked with bot requesting selector
  • default - equals to player id

JSON Example

{
  "name": "Jenya705",
  "uuid": "ca78e928-484b-36ff-bc1e-ade3e86597df",
  "type": "player"
}