/** * Get an active ban for the player * @param int $playerId The player's ID * @return Ban|null null if the player isn't currently banned */ public static function getBan($playerId) { $bans = self::fetchIdsFrom('player', array($playerId), 'i', false, "AND (expiration IS NULL OR expiration > UTC_TIMESTAMP())"); if (empty($bans)) { return null; } return Ban::get($bans[0]); }