Tutte le guide
Lifesteal

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.

Acquistare la licenza Paper, Spigot, Bukkit 1.20 – 1.21 · Java 17+

Installazione

  1. Scarichi il file dall'area clienti e lo copi nella cartella plugins del server.
  2. Avvii il server una volta: viene creata la cartella del plugin con config.yml.
  3. Incolli la sua licenza alla voce license: e riavvii il server.

Comandi

Alias: /ls

ComandoPermessoDescrizione
/hearts [player]lifesteal.heartsI tuoi cuori o quelli di un altro giocatore
/withdraw [amount]lifesteal.withdrawTrasforma i tuoi cuori in oggetti da usare o scambiare
/lifesteal toplifesteal.topClassifica dei cuori
/lifesteal give|take|set <player> <amount>lifesteal.adminCambia i cuori di un giocatore (anche offline)
/lifesteal check <player>lifesteal.adminCuori, stato e tempo di eliminazione
/lifesteal item <player> [amount]lifesteal.adminDà cuori come oggetto
/lifesteal revive <player> [hearts]lifesteal.adminRiporta in gioco un giocatore eliminato
/lifesteal eliminate <player>lifesteal.adminElimina un giocatore
/lifesteal eliminatedlifesteal.adminElenco dei giocatori eliminati
/lifesteal reloadlifesteal.adminRicarica configurazione e lingue

Permessi

PermessoPredefinitoDescrizione
lifesteal.heartstrueVedere i propri cuori
lifesteal.hearts.otherstrueVedere i cuori degli altri
lifesteal.withdrawtrueUsare /withdraw
lifesteal.toptrueVedere la classifica
lifesteal.adminopTutti i comandi di gestione
lifesteal.bypass.lossfalseNon perdere mai cuori (per le prove dello staff)

Segnaposto (PlaceholderAPI)

SegnapostoDescrizione
%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"