source_server 4.0.0 copy "source_server: ^4.0.0" to clipboard
source_server: ^4.0.0 copied to clipboard

A dart implementation of Source's Query Protocol and RCON. Supports most of the Source Games + Minecraft.

example/source_server_example.dart

// ignore_for_file: avoid_print

import 'package:source_server/source_server.dart';

Future<void> main() async {
  final server = await SourceServer.connect('127.0.0.1', 27015);

  final players = await server.getPlayers();
  print(players);

  final rules = await server
      .getRules(); // Note: this doesn't work in CS:GO, unless you have a specific SourceMod plugin installed.
  print(rules);

  final status = await server.command('status');
  print(status);

  server.close();
}
6
likes
110
pub points
9%
popularity

Publisher

verified publisherhexah.net

A dart implementation of Source's Query Protocol and RCON. Supports most of the Source Games + Minecraft.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

collection, concurrent_queue, freezed_annotation, json_annotation, logging

More

Packages that depend on source_server