mc_rcon 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 48

mc_rcon #

A library for sending commands to Minecraft servers using the rcon protocol.

This package has only been tested with Minecraft servers, so it might not work with any other game server, PRs are welcome.

Also, this package doesn't support multi-packet responses from the server, the other packets will just be ignored.

Usage #

A simple usage example:

import 'package:mc_rcon/mc_rcon.dart';

main() {
  // connect to server
  Rcon rcon = await Rcon.createAndConnect("localhost", 25575, "password");
  // send command
  String res = await rcon.sendCommand("help");

  // close connection

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1.0.0 #

  • First version, implemented base functionality (connect and send commands)


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");

  // close connection

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  mc_rcon: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:mc_rcon/mc_rcon.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Nov 8, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21


Detected platforms: Flutter, other

Primary library: package:mc_rcon/mc_rcon.dart with components: io.

Health suggestions

Format lib/src/exceptions.dart.

Run dartfmt to format lib/src/exceptions.dart.

Maintenance suggestions

The package description is too short. (-8 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
Dev dependencies
pedantic ^1.0.0
test ^1.0.0