Overview

Namespaces

  • aliuly
    • common
      • selectors
    • grabbag
      • api
    • killrate
      • api
  • xPaw

Classes

  • KillRate
  • KillRateBonusScoreEvent
  • KillRateEndStreakEvent
  • KillRateEvent
  • KillRateNewStreakEvent
  • KillRateResetEvent
  • KillRateScoreEvent
  • Overview
  • Namespace
  • Class

Class KillRate

KillRate API

Namespace: aliuly\killrate\api
Located at KillRate.php
Methods summary
public
# __construct( aliuly\killrate\Main $owner )

Parameters

$owner
  • plugin that owns this session
public array
# getRankings( integer $limit = 10, boolean $online = false, str $col = "points" )

Show rankings

Show rankings

Returns an array with each element having a ["player"] and ["count"].

Parameters

$limit
  • Max number of players to rank
$online
  • if true limit rankings to on-line players
$col
  • Type of data to return

Returns

array
public array
# getRankedScores( integer $limit = 10, boolean $online = false, str $col = "points" )

Return ranked scores

Return ranked scores

Returns an array with each element having a ["player_name"] and all the values from getScores.

Parameters

$limit
  • Max number of players to rank
$online
  • if true limit rankings to on-line players
$col
  • Type of data to sort

Returns

array
public integer
# updateScore( pocketmine\IPlayer|str $player, str $col = "points", integer $incr = 1 )

Update Database values. Returns the new updated value.

Update Database values. Returns the new updated value.

Parameters

$player
  • Player that is scoring
$col
  • Type of data to update
$incr
  • Amount to increment

Returns

integer
public
# setScore( pocketmine\IPlayer|str $player, integer $val, str $col = "points" )

Update Database values.

Update Database values.

Parameters

$player
  • Player that is scoring
$val
  • Value to set to
$col
  • Type of data to update
public integer|float
# getScore( pocketmine\IPlayer|str $player, str $col = "points" )

Returns a player's specific score.

Returns a player's specific score.

Parameters

$player
  • Player that is scoring
$col
  • Type of data to update

Returns

integer|float
public integer|null
# getKDRatio( pocketmine\IPlayer|str $player )

Get KillDeath Ratio

Get KillDeath Ratio

Parameters

$player
  • Player that is scoring

Returns

integer|null
public integer
# delScore( pocketmine\IPlayer|str $pl, str $type = null )

Returns a player's specific score.

Returns a player's specific score.

Parameters

$pl
$player - Player that is scoring
$type
$col - Type of data to update

Returns

integer
Properties summary
protected $plugin
#
API documentation generated by ApiGen