A fork of GriefPrevention that adds 3D subdivisions
GriefPrevention3D v18.4.4
Wiki: https://github.com/castledking/GriefPrevention3D/wiki
Overview
Message text can now contain PlaceholderAPI placeholders. Drop %player_name%,
%vault_eco_balance_fixed% or anything else a server-side placeholder provides into messages.yml — or into any of
the bundled Lang/messages_*.yml files — and the placeholder is resolved for the player who actually receives the
message, in their own language and with their own values.
How it works
Previously a placeholder written into a message file appeared literally in chat. Placeholders are now resolved as the message is handed to a player:
DataStore.getMessage(player, ...)— the single funnel that resolves a message against a player's locale. With per-player locales enabled this is exactly wheremessages_en.ymlis swapped for the client's language, so a German player gets the German template with their own placeholder values in one step.- The raw message send paths — denial messages built before a player is known (claim guards hand back a message
supplier that only resolves at send time), scroll resize status, action bar and delayed/respawn messages. No
localized output that reaches a player is left with literal
%...%brackets.
Placeholders are never expanded for the console or for messages built without a player, because there is nobody to resolve them for — a server-name placeholder in a console log line still makes sense, but nothing player-specific can.
Soft dependency, no surprises
PlaceholderAPI has always been an optional soft-depend. That stays true:
- PlaceholderAPI absent or disabled → every message is byte-for-byte what it was before; the
%...%text is left alone. - PlaceholderAPI present → expansion is wrapped so a placeholder that errors never breaks a message send.
- No library is bundled. The plugin still boots fine on a server that has never heard of PlaceholderAPI.
The bundled %gp3d_* expansion from v18.x (trust level, subdivision status) is untouched and combines naturally with
the new support — e.g. a message can embed %gp3d_trust_level% next to %player_name%.
Documented in every language
The header comment of every message file now advertises the feature, translated into each of the fifteen locales —
English, Pirate Speak, Czech, German, Spanish, French, Japanese, Malay, Polish, Portuguese (Brazil), Russian, Turkish,
Ukrainian and Chinese (Simplified). Successful examples (%vault_eco_balance_fixed%, %player_name%) are spelled out
so the format is copy-pastable.
Upgrade notes
No configuration or storage changes. Install PlaceholderAPI on the server (it already
sits in the plugin's soft-depend list), restart, and refresh any existing messages.yml / messages_*.yml from the
jar — or just put placeholders into the files you already have.
Two things to keep in mind:
- Placeholders resolve when a message reaches a player. Anything rendered without a player — such as the welcome book, which is built from locale strings at startup — shows the literal placeholder text unless the book is customised.
- A placeholder only generates output while the player and its backing plugin (e.g. Vault) are online. Messages sent to a player who just logged out keep the placeholder text rather than crash.
Drop-in replacement for v18.4.3.