Files
spigot-leaf/design/user-stories/us-002-relinquish-protection-when-attacking.md
T

1.9 KiB

type, title, description, status
type title description status
User Story US-002: Relinquish protection when attacking Remove Leaf protection when an opted-in player attacks another player. done

US-002: Relinquish protection when attacking

As a player facing PvP, I want Leaf protection to belong only to non-aggressors so that protected players cannot keep its advantage after fighting back.

Acceptance criteria

  • When an opted-in player damages another player, Leaf automatically changes the attacker's saved choice to opted out.
  • Automatic opt-out immediately removes Leaf-managed Resistance and the attacker's leaf prefix.
  • The attacker receives a clear chat message explaining that attacking another player disabled Leaf and that they may opt in again when permitted.
  • Receiving player-caused damage without retaliating does not change the protected player's choice or Resistance.
  • Retaliatory damage counts as attacking, including Thorns damage attributable to the protected player.
  • Direct melee attacks and player-fired projectiles are attributed to the attacking player.
  • Harmful splash or lingering potion damage is attributed to the player who threw the potion.
  • Damage caused by a tamed animal is attributed to its player owner when Spigot exposes that ownership.
  • TNT, fire, and other indirect damage trigger opt-out only when Spigot exposes a reliable responsible player; ambiguous environmental damage does not opt out an innocent player.
  • PvP-triggered opt-out applies even when an administrator has locked the player's preference.
  • A single attack produces no duplicate state changes or duplicate notifications.