LifestealCore
The core of every Lifesteal server: kill to steal a heart, die and lose one. At zero hearts the player is eliminated until staff, an add-on or time brings them back.
Installation
- Download the file from the customer area and copy it into your server's
pluginsfolder. - Start the server once: the plugin folder with
config.ymlis created. - Paste your license under
license:and restart the server.
Commands
Aliases: /ls
| Command | Permission | Description |
|---|---|---|
/hearts [player] | lifesteal.hearts | Your hearts or another player's |
/withdraw [amount] | lifesteal.withdraw | Turns your hearts into items to use or trade |
/lifesteal top | lifesteal.top | Heart leaderboard |
/lifesteal give|take|set <player> <amount> | lifesteal.admin | Changes a player's hearts (offline too) |
/lifesteal check <player> | lifesteal.admin | Hearts, status and elimination time |
/lifesteal item <player> [amount] | lifesteal.admin | Gives heart items |
/lifesteal revive <player> [hearts] | lifesteal.admin | Brings an eliminated player back |
/lifesteal eliminate <player> | lifesteal.admin | Eliminates a player |
/lifesteal eliminated | lifesteal.admin | Lists eliminated players |
/lifesteal reload | lifesteal.admin | Reloads configuration and languages |
Permissions
| Permission | Default | Description |
|---|---|---|
lifesteal.hearts | true | See your own hearts |
lifesteal.hearts.others | true | See other players' hearts |
lifesteal.withdraw | true | Use /withdraw |
lifesteal.top | true | See the leaderboard |
lifesteal.admin | op | Every management command |
lifesteal.bypass.loss | false | Never lose hearts (for staff testing) |
Placeholders (PlaceholderAPI)
| Placeholder | Description |
|---|---|
%lifesteal_hearts% | The player's hearts |
%lifesteal_max_hearts% | The server's maximum hearts |
%lifesteal_position% | Leaderboard position |
%lifesteal_eliminated% | true if the player is eliminated |
%lifesteal_eliminated_count% | How many players are eliminated |
%lifesteal_top_<n>_name% | Name at position n (e.g. %lifesteal_top_1_name%) |
%lifesteal_top_<n>_hearts% | Hearts at position n |
Elimination
With mode: BAN an eliminated player can't join until revived. With ban-minutes above 0 they come back by themselves after that time. With mode: SPECTATOR they stay on the server as a spectator. When they come back they get revive-hearts hearts.
Anti-farm
Killing the same player again within same-victim-cooldown-minutes gives no heart, so two friends can't farm each other. With ignore-same-ip: true no hearts are taken from players connected from the same IP.
For developers
Add depend: [LifestealCore] to your plugin.yml and the jar as a provided dependency. Use LifestealAPI (getHearts, addHearts, removeHearts, isEliminated, revive, createHeartItem) and listen to HeartChangeEvent, PlayerEliminateEvent and PlayerReviveEvent, which can be cancelled.
Configuration files
config.yml
# Your license key (you received it privately from our Discord bot). license: "PASTE-YOUR-LICENSE-HERE" # Message language: "en" (English) or "it" (Italiano). Files are in /lang and can be edited freely. language: en # When true, each player sees the messages in their own game language (when a file for it exists). use-client-language: true hearts: # Hearts a new player starts with (1 heart = 2 health points). start: 10 # Maximum hearts a player can have. max: 20 # Hearts stolen on every player kill. steal-amount: 1 # When the killer already has the maximum hearts: # DROP = the stolen heart drops on the ground as an item # NOTHING = the heart is simply lost killer-at-max: DROP # Dying without a player killer (fall, lava, mobs...). natural-death: lose-hearts: false amount: 1 worlds: # Worlds where hearts are stolen and lost. Empty list = every world. enabled: [] # Worlds where nothing happens on death (e.g. lobby, minigames). disabled: [] anti-farm: # Killing the same player again within this time gives no heart (stops two friends farming each other). enabled: true same-victim-cooldown-minutes: 10 # No hearts for killing a player connected from the same IP address (alt accounts). ignore-same-ip: false heart-item: material: NETHER_STAR name: "<gradient:#FF4D4D:#B30000>&lHeart</gradient>" lore: - "&7Right-click to gain &c+1 ❤&7." - "&7Sneak + right-click to use the whole stack." - "" - "&8Tradeable · Can't be placed or crafted with" glow: true # Resource pack model (0 = none). custom-model-data: 0 # Sneak + right-click uses as many hearts as possible from the stack. sneak-to-use-all: true withdraw: enabled: true # Hearts that must always stay after /withdraw. min-hearts-left: 1 elimination: # When a player reaches 0 hearts they are eliminated. When false, players can't go below 1 heart. enabled: true # BAN = the player can't join until revived (or until ban-minutes have passed) # SPECTATOR = the player stays on the server as a spectator mode: BAN # Minutes of elimination before the player can come back by themselves. 0 = until revived. ban-minutes: 0 # Hearts a player has when revived (by an admin, by time, or by an add-on like LifestealRevive). revive-hearts: 5 broadcast: true lightning: true # Console commands run when a player is eliminated. {player} = name. commands: [] effects: # Titles on screen when a player gains or loses hearts. titles: true # Sound names from https://minecraft.wiki/w/Sounds.json -> "name:volume:pitch" sound-gain: "entity.player.levelup:0.8:1.4" sound-loss: "entity.player.hurt_sweet_berry_bush:1:0.6" sound-eliminated: "entity.wither.death:0.7:1"