DUXPLIMA Documentation

Turning PvP on and off

The toggle item, the warm-ups in and out, who may hit whom, and the glow and hit particles.

A player fights only after asking to. They press the toggle item or type /pvp, stand still through a warm-up, and are in. The same press takes them out again.

The warm-ups

DirectionSettingShippedWhile it runs
Inwarm-up.enter-ms3000The player is still out: nobody can hit them and they cannot hit
Outwarm-up.leave-ms8000The player is still in: they can hit and be hit, and they keep the kit
During a warm-upWhat happens
The player moves further than warm-up.move-limit (1.5 blocks) from where they pressedIt stops; warm-up-moved runs
The player presses againIt stops; warm-up-cancelled runs
The player dies or quitsIt stops silently
It runs outThe switch happens: pvp-on or pvp-off runs

With warm-up.show-action-bar on, the action bar counts down every second: PvP starts in 3, PvP stops in 8. A warm-up set to 0 switches at once. The way out is longer on purpose: a player who is losing cannot step out the moment the fight turns, and the move limit keeps them in reach.

Who may hit whom

With arena.only-fighters-may-fight on, as shipped, a hit between two players lands only when both are fighting. A player warming up to leave still counts as fighting; one warming up to join does not yet.

AttackerVictimThe hit
FightingFightingLands, and tags both (Combat tag)
Not fightinganyoneRefused: Turn PvP on before you fight.
FightingNot fightingRefused: Steve does not have PvP on.

A refusal line is said at most once every three seconds per attacker, so a player swinging at a crowd is not flooded. Arrows and other projectiles count as hits from the player who shot them. A player hitting themselves is ignored.

With the setting off, every hit lands as the world's own rules say, and a hit between two fighters still tags them. Turn it off only on a world whose own PvP rules decide who may fight. Hits inside another plugin's game can be left to that game: see Other games.

The toggle item

Every player is given the toggle item on join: an iron sword named PvP in hotbar slot 2. A click with it, left or right, at the air or a block, presses the toggle; the click does nothing else. While a player fights, the kit takes their hotbar, and the item comes back on top of it as a glowing red dye named Leave PvP, in slot 8.

Key under toggle-itemShippedWhat it does
enabledtruefalse hands out no item, on join or on top of the kit. An item a player already holds still works, and so does /pvp
give-on-jointruePuts the item in the player's inventory on every join
slot2The hotbar slot, 0 to 8
available-in-pvptruePuts the leave face on top of the kit, so a fighter is never without a way out
itemiron swordThe lobby face. See config.conf
in-pvp.slot8The slot of the leave face
in-pvp.itemred dyeThe leave face

The item goes to its slot when that slot is empty or holds the item already, otherwise to the first free slot; it never writes over another item. It is locked: it cannot be dropped, moved, swapped to the off hand or placed, and it is not dropped on death. Its name and lore are drawn in each viewer's language.

The leave face is set into its slot over whatever the kit put there, so keep in-pvp.slot clear of the kit's extras. Delete the in-pvp block and the lobby face comes back at its own slot.

The glow and the hit particles

Key under visualsShippedWhat it does
glowtrueOutlines every fighter, so the lobby can see who is in. The colour is the player's scoreboard team colour, which uxmGlow sets; without it the outline is white. A player who already glows is left alone
hit-particlestrueDraws particles on a fighter who is hit
hit-particle"CRIT"The particle, with its data after a space: "dust #ff0000", "block oak_log", "dust_color_transition #ff0000>#0000ff". A name the server does not know draws CRIT
hit-particle-count12How many, at least 1

Notes

  • The toggle item checks no node. uxmhubpvp.use hides /pvp, but a player holding the item can still press it. Keep the item away from a group that should not fight.
  • Teleports do not stop a fight. A fighter who is teleported keeps fighting; only the move limit of a warm-up watches where a player goes.

Related: The kit, Combat tag, Moments