Skip to content

Configuration

Astra Lifesteal loads its runtime options from the YAML resources copied into the plugin data folder on first startup.

After editing configuration, run /lifesteal reload. You do not need to restart the server for normal changes. Use /lifesteal shop reload after changing only shop.yml, or /lifesteal recipe reload after changing only recipes.yml.

config.yml

config.yml controls the main plugin behavior.

SectionPurpose
server-idIdentifies this server in stored audit and profile data. Keep it stable after launch.
heartsStarting, minimum, and maximum heart values, plus whether decimal heart amounts are allowed.
killsHearts gained by killers, hearts lost by victims, edge cases at minimum or maximum hearts, and worlds where heart loss is disabled.
eliminationWhether elimination is enabled, which mode is used, and temp-ban or spectator-lock behavior.
reviveHearts restored on revive, whether temp bans are cleared, and whether revives are broadcast.
withdrawWhether players can withdraw hearts into items and the minimum hearts left afterward.
shopGlobal shop toggle, inventory title, size, purchase limits, eliminated-player access, and filler item.
itemsMaterial, name, lore, and behavior for revive beacons and withdrawn hearts.
anti-exploitSame-IP transfer protection, staff alerts, IP hashing, and repeated killer/victim cooldowns.
databaseSQLite or remote SQL storage settings.

Storage

The plugin includes SQLite support and runtime drivers for MySQL, MariaDB, and PostgreSQL.

For a single server, SQLITE is the simplest option:

yaml
database:
  type: "SQLITE"
  sqlite:
    file: "data.db"

For a remote database, set type to MYSQL, MARIADB, or POSTGRESQL, then fill in the remote connection settings:

yaml
database:
  type: "MYSQL"
  remote:
    host: "localhost"
    port: 3306
    database: "astra_lifesteal"
    username: "user"
    password: "password"
    ssl: false
    pool-size: 10

Run /lifesteal reload after changing storage settings.

messages.yml

messages.yml contains all player-facing text. Messages use MiniMessage formatting, so tags such as <red>, <gray>, <bold>, and <newline> are supported.

The prefix key is reusable in other messages with <prefix>:

yaml
prefix: "<dark_gray>[<red>Lifesteal</red>]</dark_gray> "

reload: "<prefix><green>Reloaded Astra Lifesteal configuration and messages."

Some messages use placeholders wrapped in braces. Keep these placeholders in translated messages:

yaml
hearts-get: "<prefix><gray>{player} has <red>{hearts}</red> hearts."
shop:
  purchase-success: "<prefix><green>Purchased <white>{entry}</white> for <red>{price}</red> hearts."

Translating Messages

To use another language:

  1. Make a backup of plugins/AstraLifesteal/messages.yml.
  2. Translate the text values in messages.yml.
  3. Keep every YAML key exactly the same.
  4. Keep placeholders such as {player}, {hearts}, {duration}, {price}, and {entry} exactly as written.
  5. Keep MiniMessage tags valid, or remove formatting tags entirely.
  6. Save the file as UTF-8.
  7. Run /lifesteal reload.

Example Spanish messages:

yaml
prefix: "<dark_gray>[<red>Lifesteal</red>]</dark_gray> "
no-permission: "<prefix><red>No tienes permiso."
hearts-get: "<prefix><gray>{player} tiene <red>{hearts}</red> corazones."
reload: "<prefix><green>Configuracion y mensajes recargados."

When the plugin adds new message keys in an update, missing defaults are added back to messages.yml during reload.

recipes.yml

recipes.yml defines custom crafting recipes for lifesteal items.

Each recipe lives under recipes and has:

KeyPurpose
enabledRegisters or disables the recipe.
typeSHAPED for a crafting-grid pattern, or SHAPELESS for unordered ingredients.
result.itemPlugin item to create, such as WITHDRAWN_HEART or REVIVE_BEACON.
result.amountNumber of items produced.
result.heartsHeart value for withdrawn heart results.
shapeThree shaped recipe rows, used only for SHAPED recipes.
ingredientsMaterials mapped by symbol for shaped recipes, or a list for shapeless recipes.

Shaped example:

yaml
recipes:
  withdrawn_heart:
    enabled: true
    type: SHAPED
    result:
      item: WITHDRAWN_HEART
      amount: 1
      hearts: 1.0
    shape:
      - "DGD"
      - "GNG"
      - "DGD"
    ingredients:
      D:
        material: DIAMOND
      G:
        material: GOLD_INGOT
      N:
        material: NETHER_STAR

Shapeless example:

yaml
recipes:
  revive_beacon:
    enabled: true
    type: SHAPELESS
    result:
      item: REVIVE_BEACON
      amount: 1
    ingredients:
      - material: BEACON
      - material: TOTEM_OF_UNDYING
      - material: NETHER_STAR

Run /lifesteal recipe reload after manual recipe edits.

shop.yml

shop.yml defines the purchasable entries shown in the heart shop.

Each entry lives under entries and has:

KeyPurpose
enabledShows or hides the entry.
slotInventory slot, from 0 to 53. The usable maximum depends on the configured shop rows.
priceHeart cost. Purchases cannot leave the player below shop.minimum-hearts-after-purchase.
permissionOptional permission required to buy the entry. Use an empty string for no extra permission.
icon.materialBukkit material shown in the shop.
icon.nameMiniMessage display name.
icon.loreMiniMessage lore lines. {price} is replaced with the entry price.
icon.enchantedAdds an enchanted visual effect to the icon.
commandsServer commands run after purchase. Do not include a leading slash.

Example:

yaml
entries:
  example_key:
    enabled: true
    slot: 10
    price: 2.0
    permission: ""
    icon:
      material: "TRIPWIRE_HOOK"
      name: "<gold>Example Key"
      lore:
        - "<gray>Price: <red>{price}</red> hearts"
        - "<dark_gray>Click to buy."
      enchanted: true
    commands:
      - "say {player} bought {entry} for {price} hearts"

Supported command placeholders include {player}, {entry}, and {price}. Run /lifesteal shop reload after manual shop edits.

Built with VitePress.