Paper Plugin Guide
File mode0

Paper essentials

Configuration files

Let server owners change your plugin with config.yml instead of editing code.

Beginner1 min read

This page is still being written.

What it will cover

  • config.yml in resources, saveDefaultConfig, where it lands (plugins/YourPlugin/config.yml)
  • Reading values: getString/getInt/getDouble/getBoolean/getStringList/getConfigurationSection with defaults
  • YAML recap with nested sections and lists; why comments are not shown in our examples and where server owners usually read docs (README); note that real configs may contain comments
  • Defaults merging (copyDefaults), reloadConfig, a /myplugin reload command
  • Saving changes with set + saveConfig
  • Custom files (messages.yml) with YamlConfiguration.loadConfiguration and saveResource
  • Typed settings record loaded once; validating values and logging warnings
  • Example plugin based on example-config (plugins/config-demo)