dart_minecraft 0.2.0+1 copy "dart_minecraft: ^0.2.0+1" to clipboard
dart_minecraft: ^0.2.0+1 copied to clipboard

outdated

Utilities to access all Minecraft and Mojang APIs, including skins, name history and account management

dart_minecraft #

Pub Package GitHub Issues GitHub Stars GitHub License

A simple Dart library for interfacing with the Mojang and Minecraft APIs.

Examples #

Skin/Cape of a player #

void main() async {
    Pair player = await Mojang.getUuid('<your username>');
    Profile profile = await Mojang.getProfile(player.getSecond);
    String url = profile.getTextures.getSkinUrl();
}

Name history of a player #

void main() async {
    Pair uuid = await Mojang.getUuid('<your username>');
    List<Name> history = await Mojang.getNameHistory(uuid.getSecond);
    history.forEach((Name name) => print(name.getName));
}

Reading NBT data #

void main() async {
    // You can create a NbtFile object from a File object or
    // from a String path.
    final nbtFile = NbtFile.fromFile(File('yourfile.nbt'));
    await nbtFile.readFile();
    NbtCompound rootNode = nbtFile.root;
    // You can now read information from your [rootNode].
    // for example, rootNode["servers"] will return a child,
    // if it exists.
}

Planned #

  • Support for all the Minecraft and Minecraft Launcher APIs.
  • Support for reading and writing NBT files.
  • Support for launching Minecraft itself.
  • Support for seeing and joining a Minecraft Server.

License #

The MIT License, see LICENSE.

19
likes
0
pub points
63%
popularity

Publisher

unverified uploader

Utilities to access all Minecraft and Mojang APIs, including skins, name history and account management

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

meta, path, uuid

More

Packages that depend on dart_minecraft