DUXPLIMA Documentation

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, while useBypassPermission is on (the default). Ops have it,
  • when the server stops: tags then end as expired.
KeyDefaultMeaning
enabledtrueTurns the module on or off
punishmentsAll fiveWhich punishments run, in the order listed
commandsemptyConsole commands for COMMANDS. %player% is the player's name
broadcastMessageCombat logger {player} disconnected while fighting {combat_enemy_count} enemies.The message for BROADCAST
disabledWorldsemptyWorlds where logging out is not punished
useBypassPermissiontrueWhether bypassPermission is checked
bypassPermissionuxmpvpcore.bypass.combatlogPlayers with it are never punished

Punishments

PunishmentDoes
KILLKills the player. Their items drop as on any death, unless keep inventory is on
DROP_INVENTORYDrops everything in their inventory and armour slots on the ground. These drops can be locked by drop protection
COMMANDSRuns each line of commands from the console
CLEAR_INVENTORYDeletes everything left in their inventory and armour slots
BROADCASTSends 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 wantpunishments
The player dies and drops everything (the default result)KILL, BROADCAST
Items drop, with drop protection, but the player does not dieDROP_INVENTORY, BROADCAST
Items are deleted, nobody gets themCLEAR_INVENTORY, BROADCAST
A ban or a fine insteadCOMMANDS, 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.

KeyDefaultMeaning
enabledtrueTurns the module on or off
dropProtectModeNO_ONEWho may pick up a locked item
dropProtectSeconds15How long items stay locked
protectedItemName🔒 {time}The name shown above a locked item. {time} is the seconds left
handleCombatDeathDropstrueLock the drops of a tagged player's death
handleCombatLogDropstrueLock the drops of DROP_INVENTORY
handleHopperPickuptrueKeep hoppers from taking locked items
disabledWorldsemptyWorlds where nothing is locked
eventPrioritySettingsHIGHESTWhen the plugin handles drops, pickups and hoppers
dropProtectModeMay pick up
KILLEROnly the last player who hit the dead player
VICTIMOnly the player who died, after respawning
KILLER_AND_ASSISTEvery player who hurt the dead player in that fight
COMBAT_PLAYERSEvery player in that fight: those who hurt them and those they hurt
TAGGED_PLAYERSAny player who is tagged at that moment
NO_ONENobody, 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