Vault3v3.0.0

貨幣格式Currency

控制 economy.format() 的輸出,所有透過 Vault API 顯示金額的插件都會套用。

currency:
  symbol: "$"           # 支援 & 色碼,例如 "&6$"
  position: suffix      # prefix / suffix / none
  space: true           # 符號與數字之間是否留空格
  format: auto          # DecimalFormat 樣式,auto 為自動
  abbreviate:
    enabled: false
    decimals: 1
    suffix:
      k: k
      m: m
      b: b
      t: t

position

輸出
suffix10 $
prefix$ 10
none10

縮寫

abbreviate.enabled: true 時,1200 會顯示為 1.2k、 3400000 顯示為 3.4m。這只影響 format()%vault_balance% 這類原始數值變數不受影響。

format

auto 時會先讀 Essentials 的 currency-format(若有安裝), 否則使用 #,##0.00。也可以直接填 Java DecimalFormat 樣式。 樣式無效時會記錄警告並退回預設值,不會讓插件無法啟動。

Controls the output of economy.format(), which every plugin displaying money through the Vault API will use.

currency:
  symbol: "$"           # supports & colour codes, e.g. "&6$"
  position: suffix      # prefix / suffix / none
  space: true           # space between symbol and number
  format: auto          # DecimalFormat pattern, or auto
  abbreviate:
    enabled: false
    decimals: 1
    suffix:
      k: k
      m: m
      b: b
      t: t

position

ValueOutput
suffix10 $
prefix$ 10
none10

Abbreviation

With abbreviate.enabled: true, 1200 renders as 1.2k and 3400000 as 3.4m. This affects format() only; raw placeholders such as %vault_balance% are unchanged.

format

auto reads Essentials' currency-format if Essentials is installed, otherwise falls back to #,##0.00. You can also supply a Java DecimalFormat pattern directly. An invalid pattern logs a warning and falls back to the default rather than preventing startup.

Vault3 · 以 AGPL-3.0 散布,內含 LGPL-3.0 的 VaultAPI。
Vault3 · Distributed under AGPL-3.0. Bundles VaultAPI under LGPL-3.0.
Copyright © 2021-2026 CloudXact Studio. All Rights Reserved.