Combat Logging
What happens to a player who logs out while tagged, and how the drops of a fight are locked for the right players.
Two modules deal with the end of a fight: CombatLog punishes a player who leaves the server while tagged, and ThiefPrevent locks the items that fall on a combat death or a combat log.
Logging out in combat
File: configs/combattag/CombatLogConfig.yml.
A player combat logs when they leave while tagged: they quit, lose connection, or are kicked. Their
tag ends with LOGOUT, the last attacker gets the kill and the player a death (see
Statistics), and the punishments run.
Nobody is punished:
- in creative or spectator mode,
- in a world listed in
disabledWorlds, - with
uxmpvpcore.bypass.combatlog, whileuseBypassPermissionis on (the default). Ops have it, - when the server stops: tags then end as expired.
| Key | Default | Meaning |
|---|---|---|
enabled | true | Turns the module on or off |
punishments | All five | Which punishments run, in the order listed |
commands | empty | Console commands for COMMANDS. %player% is the player's name |
broadcastMessage | Combat logger {player} disconnected while fighting {combat_enemy_count} enemies. | The message for BROADCAST |
disabledWorlds | empty | Worlds where logging out is not punished |
useBypassPermission | true | Whether bypassPermission is checked |
bypassPermission | uxmpvpcore.bypass.combatlog | Players with it are never punished |
Punishments
| Punishment | Does |
|---|---|
KILL | Kills the player. Their items drop as on any death, unless keep inventory is on |
DROP_INVENTORY | Drops everything in their inventory and armour slots on the ground. These drops can be locked by drop protection |
COMMANDS | Runs each line of commands from the console |
CLEAR_INVENTORY | Deletes everything left in their inventory and armour slots |
BROADCAST | Sends broadcastMessage to every player who has PvP broadcasts on |
They run in the order of the list. With the default list, KILL comes first, so the items drop from
the death and the later DROP_INVENTORY and CLEAR_INVENTORY find nothing left. Choose one way:
| You want | punishments |
|---|---|
| The player dies and drops everything (the default result) | KILL, BROADCAST |
| Items drop, with drop protection, but the player does not die | DROP_INVENTORY, BROADCAST |
| Items are deleted, nobody gets them | CLEAR_INVENTORY, BROADCAST |
| A ban or a fine instead | COMMANDS, BROADCAST |
punishments:
- DROP_INVENTORY
- COMMANDS
- BROADCAST
commands:
- "eco take %player% 500"
- "tempban %player% 10m Combat logging"
broadcastMessage: "<red>{player} left during a fight with {combat_attacker}."
commands takes %player% only; broadcastMessage takes {player}, the
combat placeholders and PlaceholderAPI. The broadcast goes through the
Broadcast module, so players who turned broadcasts off with /pvpbroadcasttoggle do not see it, see
Kill Messages.
Drop protection
File: configs/combattag/ThiefPrevent.yml.
When a tagged player dies, or a combat logger's inventory is dropped by DROP_INVENTORY, every item
that falls is locked for dropProtectSeconds. A locked item shows a countdown above it, cannot be
picked up by mobs or hoppers, and can be picked up only by the players dropProtectMode allows. When
the time runs out, the name disappears and anyone can take it.
| Key | Default | Meaning |
|---|---|---|
enabled | true | Turns the module on or off |
dropProtectMode | NO_ONE | Who may pick up a locked item |
dropProtectSeconds | 15 | How long items stay locked |
protectedItemName | 🔒 {time} | The name shown above a locked item. {time} is the seconds left |
handleCombatDeathDrops | true | Lock the drops of a tagged player's death |
handleCombatLogDrops | true | Lock the drops of DROP_INVENTORY |
handleHopperPickup | true | Keep hoppers from taking locked items |
disabledWorlds | empty | Worlds where nothing is locked |
eventPrioritySettings | HIGHEST | When the plugin handles drops, pickups and hoppers |
dropProtectMode | May pick up |
|---|---|
KILLER | Only the last player who hit the dead player |
VICTIM | Only the player who died, after respawning |
KILLER_AND_ASSIST | Every player who hurt the dead player in that fight |
COMBAT_PLAYERS | Every player in that fight: those who hurt them and those they hurt |
TAGGED_PLAYERS | Any player who is tagged at that moment |
NO_ONE | Nobody, until the time runs out |
The default NO_ONE keeps everyone off the loot for 15 seconds, the killer included, then lets
anyone take it. To give the killer the loot, use KILLER, and set preventItemPickup: false in
ItemPrevent: otherwise the killer is still tagged
and cannot pick anything up until the lock has ended.
dropProtectMode: KILLER_AND_ASSIST
dropProtectSeconds: 20
protectedItemName: "<gold>Loot of the fight <gray>{time}s"
Items from a death with keep inventory on, from a normal death while not tagged, and from the KILL
punishment are not locked.
Related: Combat Tag, Combat Restrictions
Was this page helpful?