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.
| Section | Purpose |
|---|---|
server-id | Identifies this server in stored audit and profile data. Keep it stable after launch. |
hearts | Starting, minimum, and maximum heart values, plus whether decimal heart amounts are allowed. |
kills | Hearts gained by killers, hearts lost by victims, edge cases at minimum or maximum hearts, and worlds where heart loss is disabled. |
elimination | Whether elimination is enabled, which mode is used, and temp-ban or spectator-lock behavior. |
revive | Hearts restored on revive, whether temp bans are cleared, and whether revives are broadcast. |
withdraw | Whether players can withdraw hearts into items and the minimum hearts left afterward. |
shop | Global shop toggle, inventory title, size, purchase limits, eliminated-player access, and filler item. |
items | Material, name, lore, and behavior for revive beacons and withdrawn hearts. |
anti-exploit | Same-IP transfer protection, staff alerts, IP hashing, and repeated killer/victim cooldowns. |
database | SQLite 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:
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:
database:
type: "MYSQL"
remote:
host: "localhost"
port: 3306
database: "astra_lifesteal"
username: "user"
password: "password"
ssl: false
pool-size: 10Run /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>:
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:
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:
- Make a backup of
plugins/AstraLifesteal/messages.yml. - Translate the text values in
messages.yml. - Keep every YAML key exactly the same.
- Keep placeholders such as
{player},{hearts},{duration},{price}, and{entry}exactly as written. - Keep MiniMessage tags valid, or remove formatting tags entirely.
- Save the file as UTF-8.
- Run
/lifesteal reload.
Example Spanish messages:
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:
| Key | Purpose |
|---|---|
enabled | Registers or disables the recipe. |
type | SHAPED for a crafting-grid pattern, or SHAPELESS for unordered ingredients. |
result.item | Plugin item to create, such as WITHDRAWN_HEART or REVIVE_BEACON. |
result.amount | Number of items produced. |
result.hearts | Heart value for withdrawn heart results. |
shape | Three shaped recipe rows, used only for SHAPED recipes. |
ingredients | Materials mapped by symbol for shaped recipes, or a list for shapeless recipes. |
Shaped example:
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_STARShapeless example:
recipes:
revive_beacon:
enabled: true
type: SHAPELESS
result:
item: REVIVE_BEACON
amount: 1
ingredients:
- material: BEACON
- material: TOTEM_OF_UNDYING
- material: NETHER_STARRun /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:
| Key | Purpose |
|---|---|
enabled | Shows or hides the entry. |
slot | Inventory slot, from 0 to 53. The usable maximum depends on the configured shop rows. |
price | Heart cost. Purchases cannot leave the player below shop.minimum-hearts-after-purchase. |
permission | Optional permission required to buy the entry. Use an empty string for no extra permission. |
icon.material | Bukkit material shown in the shop. |
icon.name | MiniMessage display name. |
icon.lore | MiniMessage lore lines. {price} is replaced with the entry price. |
icon.enchanted | Adds an enchanted visual effect to the icon. |
commands | Server commands run after purchase. Do not include a leading slash. |
Example:
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.