Paper Plugin Guide
File mode0

Going further

Organizing a bigger plugin

Packages, managers and clean wiring so your plugin stays easy to change.

Intermediate1 min read

This page is still being written.

What it will cover

  • Package by feature (homes, warps, economy) vs by type
  • Main class as the wiring hub; constructor injection; avoiding static everything
  • Manager/service classes holding state; listeners and commands as thin layers
  • Config and messages classes; constants
  • Reload support and lifecycle-safe resources
  • Naming conventions and file sizes; when to split a class
  • A diagram of a well organized plugin; example plugin with 3 features organized cleanly (plugins/organized-plugin)