-
Notifications
You must be signed in to change notification settings - Fork 8
Locale
GriefPrevention3D supports localized messages via YAML locale files. The plugin loads messages based on the GriefPrevention.Locale config setting, and can also send messages in a player's own language with per-player locale support.
To change the server's default language, set the locale code in config.yml:
GriefPrevention:
Locale: esThen either:
-
Copy the desired locale file from the
Lang/folder to the data folder root:GriefPreventionData/ Lang/ messages_en.yml <- bundled reference copies (refreshed on restart) messages_es.yml messages_pt_BR.yml messages_es.yml <- your active locale file (copied here by you) config.yml -
Or just set
Locale:in config.yml and delete or move any oldmessages_*.ymlfiles — the plugin will extract the matching locale file automatically on the next restart or/greload.
Restart the server or run /greload.
Players with a Spanish or Portuguese Minecraft client locale will receive messages in their language automatically — no configuration needed. This is enabled by default with:
GriefPrevention:
PerPlayerLocale: trueSee Per-Player Locale for details.
| Path | Purpose |
|---|---|
GriefPreventionData/messages_{locale}.yml |
Active locale files read by the plugin |
GriefPreventionData/Lang/ |
Reference copies extracted from JAR on every restart |
GriefPreventionData/messages.yml |
Legacy file (backward compatibility) |
-
messages_{locale}.yml— matches yourconfig_localesetting (e.g.,messages_es.ymlforLocale: es) -
messages.yml— legacy fallback for servers migrated from older versions -
Auto-detect — if neither exists, scans for any
messages_*.ymland auto-switches - Extract from JAR — if nothing found, extracts the matching locale from the JAR
If your config says Locale: en but only messages_es.yml exists in the data folder, the plugin auto-switches to Spanish and logs:
Locale 'en' didn't match provided messages_es.yml. Auto-switched to 'es'
The in-memory locale is updated so the startup header and all messages use the detected language.
On every startup, the plugin compares your deployed locale file against the bundled JAR version. Any missing keys are automatically added and saved to your file. This means:
- New messages added in plugin updates appear automatically after restart
- You don't need to manually edit your locale file when upgrading
- Your customizations are preserved (existing keys are never overwritten)
| Locale | Language |
|---|---|
en |
English |
es |
Spanish |
pt_BR |
Brazilian Portuguese |
- Create
messages_{locale}.ymlin the JAR's resource path (undersrc/main/resources/) - Add the locale code to
SUPPORTED_LOCALE_CODESinMessageLocalization.java - Add the filename to
BUNDLED_LOCALE_FILESinMessageLocalization.java - Add locale entries to
startups.txt(e.g.,fr1[...,fr2[...,fr3[...) - The plugin will extract it to
Lang/on next restart
Each message is stored under a Messages. key matching the enum name in Messages.java:
Messages:
ClaimCreated: "Claims created successfully."
NoPermission: "You don't have permission to do that."You can customize any message by editing the corresponding key in your locale file. The plugin uses $ or & as color code prefixes, and supports &#RRGGBB hex colors.
The startup header respects your locale setting. If you have locale entries in startups.txt matching your config (e.g., es1[..., es2[..., es3[...), the plugin displays a localized header on startup.
For locales with a region suffix (e.g., pt_BR), the header falls back to the base language (e.g., pt) if no exact match is found.
Getting Started
Features
- Key Features
- 3D Subdivisions
- Shaped Claims
- Merge Claims
- Nested Subclaims
- Visualization Glow
- Unified
/claimHandler - Claim Selection
- Boundary Violation Alerts
Reference
Admin