RocketMC 0.9.0 beta: Java and Bedrock, one binary. See what's new

RocketMC is in beta (0.9.0). These docs follow the source code; if something differs on your build, the code wins. Please report it on GitHub.

Plugin API

Storage and Economy

Config files, per-player data, an economy, leaderboards and daily streaks.

Updated Dec 5, 2026

Plugins store data as plain files in their private data folder. These helpers wrap the common cases. Every module on this page needs the fs.read.data and fs.write.data permissions, except the pure in-memory ones (Leaderboard, streak).

ModuleSimilar toWhat it gives you
config::PluginConfiggetConfig()config.toml in the data folder with defaults, dotted paths, typed getters, set, save, reload
playerdata::PlayerDataPer-player data filesPlayerData::load(&ctx): get_i64, get_str, get_bool, the matching setters, add_i64, remove, all_i64(key). Stored in playerdata.toml
economy::EconomyVault EconomyFile-backed balances in economy.toml: balance, has, set, deposit, withdraw, transfer, top, format. Stored as whole cents
leaderboard::LeaderboardTop listsset, add, get, top, rank_of, render
streakDaily rewardsclaim(last_day, today, streak), day_index(unix_secs), reward(base, step, cap, streak)
shop::PriceListShop price listsPriceList::from_config, quote_buy, quote_sell

Economy

use rocketmc_plugin_api::prelude::*;

fn on_load(&self, ctx: Context) -> Result<()> {
    let eco = Economy::load(&ctx).map_err(|e| e.to_string())?;

    // accounts are keyed by the player's UUID hex
    // let id = account_of(&player);
    // eco.deposit(&id, 50.0)?;
    // eco.withdraw(&id, 10.0)?;   // Err(EconomyError) when funds are short
    // eco.transfer(&from, &to, 5.0)?;
    // for (account, balance) in eco.top(10) { /* ... */ }
    Ok(())
}

The economy belongs to your plugin. Other plugins cannot read it, because each plugin has its own data folder.

Player data

let data = PlayerData::load(&ctx).map_err(|e| e.to_string())?;
let id = account_of(&player);
let joins = data.add_i64(&id, "joins", 1).map_err(|e| e.to_string())?;

Leaderboards and streaks

let mut board = Leaderboard::new();
board.add("Steve", 10);
board.add("Alex", 25);
for line in board.render("&6Top players", 5) {
    player.send_message(&line);
}

ratelimit::RateLimiter, confirm::Confirmations, toggle::ToggleSet and tprequest::TeleportRequests have a const fn new(), so they can live in a static.