plugin.yml manifest file. It ensures all required fields are present and correctly formatted according to PocketMine-MP standards.
What it checks
The analyzer performs comprehensive validation across multiple areas:File existence and structure
- Verifies that
plugin.ymlexists in the plugin root directory - Validates YAML syntax is correct and parseable
- Ensures the file contains a YAML mapping (not a scalar or array)
Required fields
The analyzer checks for all required fields:name- Plugin identifierversion- Plugin version numbermain- Fully-qualified main class nameapi- PocketMine-MP API version(s)
Field validation
Each field is validated according to specific rules:Plugin name validation
Plugin name validation
- Must be a string type
- Can only contain letters, numbers, hyphens, periods, underscores, and spaces
- Warns if name contains spaces (discouraged)
Version validation
Version validation
- Must be a string or number
- Should follow semantic versioning format (MAJOR.MINOR.PATCH)
- Supports pre-release and build metadata
Main class validation
Main class validation
- Must be a fully-qualified class name string
- Must follow PHP namespace and class naming conventions
- Must be a valid PHP identifier with backslash separators
API version validation
API version validation
- Can be a string (single version) or array (multiple versions)
- Must follow format:
X.Y.Z(three-part semantic version) - Warns if using API version older than 4.0.0
Optional fields validation
The analyzer also validates optional fields when present:Commands
Commands
Each command must be a mapping with proper configuration:Issue detected:
Permissions
Permissions
Permission default values must be valid:Issue detected:
op- Operator onlynotop- Non-operators onlytrue- Everyonefalse- Nobody
Dependencies
Dependencies
All dependency types must be strings or arrays of strings:Issue detected:
depend- Hard dependencies (required)softdepend- Soft dependencies (optional)loadbefore- Load order dependencies
Load order
Load order
The Issue detected:
load field controls when the plugin loads:STARTUP- Load during server startupPOSTWORLD- Load after worlds are loaded
Issues detected
The analyzer reports issues across multiple severity levels:Error severity
- Missing
plugin.ymlfile - YAML syntax errors
- Missing required fields
- Invalid field types or formats
- Invalid main class format
- Invalid API version format
- Invalid permission or command configuration
Warning severity
- Plugin name contains invalid characters
- API version is outdated (< 4.0.0)
Info severity
These are suggestions for improvement, not critical issues.
- Plugin name contains spaces
- Version doesn’t follow semantic versioning
Code examples
Correct plugin.yml
Common issues
Fix suggestions
When the analyzer finds issues, it provides actionable suggestions:| Issue | Suggestion |
|---|---|
| Missing plugin.yml | Create a plugin.yml file with required fields: name, version, main, api |
| Missing required field | Add the ‘field_name’ field to plugin.yml |
| Invalid main class format | Main class must be a valid fully-qualified PHP class name |
| Name with spaces | Consider using hyphens or underscores instead of spaces |
| Non-semver version | Consider using semantic versioning (MAJOR.MINOR.PATCH) |
| Outdated API version | Update your plugin to use the latest PocketMine-MP API |
The analyzer validates your plugin.yml at
src/Analyzer/PluginYmlAnalyzer.php:18-70