Examples

Task-focused guides for the main features of cw-commons. Each page is a self-contained walkthrough with copy-pasteable code.

Configuration & commands

  • Config Loading — load and validate a YAML config with ConfigManager.
  • Bukkit Types — bind Location and ItemStack fields in configs and stored values, and their serialized format.
  • Commands — register commands with BaseCommand.

Data storage

Start with Data Store; the other two build on it but not on each other, so read whichever applies to you (and skip MongoDB entirely if you don’t need it):

  1. Data Store — the concepts behind the write-behind key-value store, plus the bundled SQLite backend. Start here.
  2. Bukkit Integration — per-player data, periodic flushing, and storing Bukkit types like Location and ItemStack.
  3. MongoDB Backendoptional. The same DataStore API, backed by MongoDB instead of a local file.

For the full API, see the Javadoc.


Table of contents


This site uses Just the Docs, a documentation theme for Jekyll.