
Список изменений
GPExpansion v1.0.5
Highlights
/buyclaimblockschat output is now translatable through GriefPrevention'smessages.yml.- Added a public
GPBridge.getGPMessage(...)accessor so other GPExpansion features can reuse GP-side translations without duplicating strings. - Added
GPExpansionPlugin.getBalance(OfflinePlayer)for richer "not enough money" error context.
Unified Translations With GriefPrevention
Server admins reported that strings like "This command can only be used by players." and "Economy features are disabled on this server." could not be translated for the /buyclaimblocks flow because they were hard-coded in GPExpansion. This release routes the chat-side strings through GriefPrevention's existing messages.yml, so a single translation pass covers both plugins.
The following messages are now read from plugins/GriefPreventionData/messages.yml (with GP3D v17.3.10+, or any GP fork that exposes the Messages enum):
CommandRequiresPlayer— sent when the command is used from console.EconomyDisabled— when the claim-blocks economy feature is disabled.EconomyNoVault— when no Vault provider is hooked.EconomyBuyBlocksUsage— when the amount argument is missing.EconomyInvalidAmount— when the amount argument is not a positive integer.EconomyNotEnoughMoney— supports{0}cost and{1}balance placeholders.EconomyPurchaseCancelled— sent when the player clicks the GUI cancel button.EconomyBuyBlocksConfirmation— supports{0}amount,{1}cost,{2}new total placeholders.
If GriefPrevention is missing or running an older fork that does not expose those keys, GPExpansion silently falls back to the same English text shipped in v1.0.4, so behavior is unchanged for that case.
GUI-only strings (button labels, item names, hopper title, lore) still live in plugins/GPExpansion/lang.yml and are unaffected by this change.
Technical Improvements
GPBridge.getGPMessage(String key, String... args)andgetGPMessageOr(String key, String fallback, String... args)provide reflective access to GP's translated messages, with cached lookups for both theMessagesenum class and theDataStore.getMessagemethod.GPExpansionPlugin.getBalance(OfflinePlayer)exposes a unified balance read that supports both legacy Vault and Vault 2 providers.BuyClaimBlocksCommandandBuyClaimBlocksConfirmationGUIwere refactored to use the new bridge methods; English defaults remain inline as fallbacks.