Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Player

Player class which is returned by the World.getPlayer method. Should not be created by any other method.

Hierarchy

  • Player

Index

Constructors

constructor

  • new Player(name: string, info: PlayerInfo, lists: WorldLists): Player
  • Creates a new instance of the Player class.

    Parameters

    • name: string

      The name of the player.

    • info: PlayerInfo

      The player info stored between bot launches.

    • lists: WorldLists

    Returns Player

Accessors

hasJoined

  • get hasJoined(): boolean
  • Checks if the player has joined the server.

    Returns boolean

ip

  • get ip(): string
  • Gets the most recently used IP of the player.

    Returns string

ips

  • get ips(): string[]
  • Gets the all IPs used by the player on the world.

    Returns string[]

isAdmin

  • get isAdmin(): boolean
  • Checks if the player is an admin or the owner.

    Returns boolean

isBanned

  • get isBanned(): boolean
  • Checks if the player is banned.

    Returns boolean

isMod

  • get isMod(): boolean
  • Checks if the player is a mod without admin permissions.

    Returns boolean

isOwner

  • get isOwner(): boolean
  • Returns true if the player is the owner of the server or is the server.

    Returns boolean

isStaff

  • get isStaff(): boolean
  • Checks if the player is an admin or a mod.

    Returns boolean

isWhitelisted

  • get isWhitelisted(): boolean
  • Checks if the player is whitelisted. Is true if the player can join the server while it is whitelisted.

    Returns boolean

joins

  • get joins(): number
  • Gets the number of times the player has joined the server.

    Returns number

name

  • get name(): string
  • Gets the player's name.

    Returns string

Generated using TypeDoc