LifestealCore
La base di ogni server Lifesteal: chi uccide ruba un cuore, chi muore lo perde. A zero cuori il giocatore viene eliminato finché non lo rianima lo staff, un add-on o il tempo.
Installazione
- Scarichi il file dall'area clienti e lo copi nella cartella
pluginsdel server. - Avvii il server una volta: viene creata la cartella del plugin con
config.yml. - Incolli la sua licenza alla voce
license:e riavvii il server.
Comandi
Alias: /ls
| Comando | Permesso | Descrizione |
|---|---|---|
/hearts [player] | lifesteal.hearts | I tuoi cuori o quelli di un altro giocatore |
/withdraw [amount] | lifesteal.withdraw | Trasforma i tuoi cuori in oggetti da usare o scambiare |
/lifesteal top | lifesteal.top | Classifica dei cuori |
/lifesteal give|take|set <player> <amount> | lifesteal.admin | Cambia i cuori di un giocatore (anche offline) |
/lifesteal check <player> | lifesteal.admin | Cuori, stato e tempo di eliminazione |
/lifesteal item <player> [amount] | lifesteal.admin | Dà cuori come oggetto |
/lifesteal revive <player> [hearts] | lifesteal.admin | Riporta in gioco un giocatore eliminato |
/lifesteal eliminate <player> | lifesteal.admin | Elimina un giocatore |
/lifesteal eliminated | lifesteal.admin | Elenco dei giocatori eliminati |
/lifesteal reload | lifesteal.admin | Ricarica configurazione e lingue |
Permessi
| Permesso | Predefinito | Descrizione |
|---|---|---|
lifesteal.hearts | true | Vedere i propri cuori |
lifesteal.hearts.others | true | Vedere i cuori degli altri |
lifesteal.withdraw | true | Usare /withdraw |
lifesteal.top | true | Vedere la classifica |
lifesteal.admin | op | Tutti i comandi di gestione |
lifesteal.bypass.loss | false | Non perdere mai cuori (per le prove dello staff) |
Segnaposto (PlaceholderAPI)
| Segnaposto | Descrizione |
|---|---|
%lifesteal_hearts% | Cuori del giocatore |
%lifesteal_max_hearts% | Cuori massimi del server |
%lifesteal_position% | Posizione in classifica |
%lifesteal_eliminated% | true se il giocatore è eliminato |
%lifesteal_eliminated_count% | Quanti giocatori sono eliminati |
%lifesteal_top_<n>_name% | Nome in posizione n (es. %lifesteal_top_1_name%) |
%lifesteal_top_<n>_hearts% | Cuori in posizione n |
Eliminazione
Con mode: BAN il giocatore eliminato non può entrare finché non viene rianimato. Con ban-minutes maggiore di 0 rientra da solo dopo quel tempo. Con mode: SPECTATOR resta nel server come spettatore. Al rientro riceve revive-hearts cuori.
Anti-farm
Uccidere di nuovo la stessa persona entro same-victim-cooldown-minutes non dà cuori, così due amici non possono passarsi cuori all'infinito. Con ignore-same-ip: true non si prendono cuori da giocatori collegati dallo stesso IP.
Per sviluppatori
Aggiungi depend: [LifestealCore] nel tuo plugin.yml e il jar come dipendenza provided. Usa LifestealAPI (getHearts, addHearts, removeHearts, isEliminated, revive, createHeartItem) e ascolta gli eventi HeartChangeEvent, PlayerEliminateEvent e PlayerReviveEvent, che si possono annullare.
File di configurazione
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"