mc_rcon 1.0.0 copy "mc_rcon: ^1.0.0" to clipboard
mc_rcon: ^1.0.0 copied to clipboard

A starting point for Dart libraries or applications.

example/mc_rcon_example.dart

import 'package:mc_rcon/mc_rcon.dart';

main() async {
  Rcon rcon;
  try {
    // connect to the Minecraft server
    rcon = await Rcon.createAndConnect("localhost", 25575, "password");
  } on AuthenticationFailedException {
    print("wrong password");
  }

  // send "/help" command and print result
  String res = await rcon.sendCommand("help");
  print(res);

  // close connection
  rcon.disconnect();
}
1
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A starting point for Dart libraries or applications.

Repository (GitHub)
View/report issues

License

BSD-2-Clause (LICENSE)

More

Packages that depend on mc_rcon