LogicUsing Events
Player Hit Player
Triggers when a player damages another player.
This event fires when a player damages another player, either through melee attacks or projectiles.
Action Values
Player: The player who dealt the damage (the attacker).Target Player: The player who received the damage (the victim).Damage: A Number value representing the amount of damage dealt.
Event Configuration
- Cancel Event: If
true, the damage will be cancelled.
Use Cases
- Implementing custom PvP rules, like disabling PvP in a safe zone.
- Creating special abilities, such as a "lifesteal" weapon that heals the attacker.
- Logging PvP encounters for admin review.
Example: Lifesteal Sword
- Region: Select your PvP arena region.
- Event: Add a
Player Hit Playerevent. - Actions:
- Add a
Conditionalaction. - Condition: Check if the attacking
Playeris holding a specific enchanted sword. - If Actions:
Heal Player: Target thePlayer(the attacker). The amount can be a fixed value or calculated based on theDamageaction value using properties.
- Add a