Paper Migration Guide

Transitioning from Java (Bukkit/Spigot/Paper) to Rust (PotatoMC) is designed to be intuitive. PotatoMC maps familiar OOP concepts to Rust's trait-based architecture while enforcing thread safety.

1. Concept Mapping

Bukkit (Java)PotatoMC (Rust)
JavaPlugin classPlugin trait + potato_plugin! macro
onEnable()fn on_enable(&self, context: &PluginContext)
@EventHandlercontext.register_event(|event| )
BukkitRunnablecontext.scheduler().run_task(...)
plugin.ymlDefined in metadata() method of the Plugin trait

2. Dealing with the Borrow Checker

The biggest shift for Java developers is dealing with Rust's borrow checker. Because PotatoMC uses multi-threaded ticking for chunks, you cannot hold mutable references across await points or tick boundaries. Use IDs (like UUID or EntityId) rather than holding direct references to Player or Entity objects in your long-running state.