DUXPLIMA Documentation

Combat Restrictions

What tagged players cannot do, teleporting, flying and elytra, commands, items and building, and how to loosen each rule.

Five modules limit what a tagged player can do. Each has its own file in configs/combattag/, works only while the player is tagged, and does nothing to players who are not.

ModuleFileDefault while tagged
TeleportPreventTeleportPrevent.ymlNo teleport of any kind, ender pearls and chorus fruit included
FlyPreventFlyPrevent.ymlNo flying, no gliding, a worn elytra is moved to the inventory
CommandPreventCommandPrevent.ymlOnly /mute and /ban work
ItemPreventItemPrevent.ymlNo picking up, no dropping
BuildPreventBuildPrevent.ymlBlocks can be broken but drop nothing; no placing

Each module can be turned off with enabled: false in its file. All of them need the CombatTag module.

Strict defaults

Out of the box a tagged player cannot throw an ender pearl, use any command except /mute and /ban, or pick up an item. Most servers loosen at least the teleport causes and the command list before opening.

Teleporting

File: TeleportPrevent.yml.

KeyDefaultMeaning
preventCausesEvery causeWhich kinds of teleport are refused
maxEnderPearlTeleportDistance1000Longest ender pearl teleport allowed, in blocks. 0 means no limit
refreshTagtrueA refused teleport tags the player again for the full duration
useBypassPermissiontrueWhether bypassPermission is checked
bypassPermissionuxmpvpcore.bypass.teleport-preventPlayers with it may teleport. Ops have it
priorityNORMALWhen the plugin handles teleports, compared with other plugins
message"You cannot teleport while in combat."Sent when a teleport is refused

preventCauses lists Paper's teleport causes. The main ones:

CauseTeleport
COMMAND/tp, and the /spawn, /home or /tpa of many plugins
PLUGINTeleports a plugin makes on its own; some plugins use it for /spawn, /warp or RTP
ENDER_PEARLEnder pearls
CONSUMABLE_EFFECTChorus fruit and other food that teleports
NETHER_PORTAL, END_PORTAL, END_GATEWAYPortals
SPECTATETeleporting to a player in spectator mode
EXIT_BED, DISMOUNTLeaving a bed or a vehicle
UNKNOWNAnything else

Because every cause is in the list, ender pearls are refused entirely and maxEnderPearlTeleportDistance never comes into play. To allow pearls within a distance, remove ENDER_PEARL from the list. A pearl that would land in another world, or further than the limit, is then still refused.

preventCauses:
  - COMMAND
  - PLUGIN
  - NETHER_PORTAL
  - END_PORTAL
  - END_GATEWAY
  - SPECTATE
maxEnderPearlTeleportDistance: 30
refreshTag: true

With refreshTag on, a player who tries /spawn again and again stays tagged until they stop.

Flying and elytra

File: FlyPrevent.yml.

What happensWhen
Flying is turned off and the player loses permission to flyWhen they are tagged, and when they try to fly while tagged
Gliding stops, the elytra moves into the inventory and the player is pushed downWhen they are tagged while gliding, and when they try to glide while tagged
A newly worn elytra moves into the inventoryWhen they put one on while tagged

An elytra moves into the inventory only if there is a free slot. Flight is not given back when the tag ends: a player who used /fly turns it on again.

KeyDefaultMeaning
priorityHIGHESTWhen the plugin handles flying and gliding
disabledWorldsemptyWorlds where flying and gliding are allowed in combat
checkPacketBasedGlideToggletrueCatches the jump that starts gliding as a packet, before the server sees it. Turn it off if gliding acts strangely
defaultSettingsThe settings for every world
perWorldSettingsemptySettings for one world, replacing defaultSettings there

In defaultSettings, and in each world of perWorldSettings:

KeyDefaultMeaning
checkToggleEventtrueReact when a tagged player starts flying or gliding
checkMoveEventfalseAlso check on every move. Catches flying given by other plugins, at some cost
useBypassPermissiontrueWhether bypassPermission is checked
bypassPermissionuxmpvpcore.bypass.flyPlayers with it may fly and glide. Ops have it
flyMessage, glideMessage"You cannot fly / glide while in combat."Sent when stopped
removeWornElytraMessage"You cannot wear an elytra while in combat."Sent when the elytra is moved

The file also has preventFly, preventGlide and removeWornElytraToInventory. In 2.0.0 they have no effect: flying and gliding are always stopped and the elytra always moved. To allow either in a world, add the world to disabledWorlds.

A world in perWorldSettings uses only its own section; keys missing there take the plugin's defaults, not your defaultSettings.

Commands

File: CommandPrevent.yml.

KeyDefaultMeaning
enabledtrueTurns the module on or off
typeWHITELISTWHITELIST: only the listed commands work. BLACKLIST: the listed commands are refused, all others work
commandsmute, banThe list
disabledWorldsexampleWorlds where every command works in combat
bypassPermissionuxmpvpcore.bypass.commandPreventPlayers with it may use every command. Always checked. Ops have it
priorityNORMALWhen the plugin handles commands
message"You cannot use this command while in combat."Sent when a command is refused

Only the first word of the command is compared, in lower case and without the slash. Write each name without a slash, and list aliases and namespaced forms separately: tpa, essentials:tpa.

A list for a typical survival server, where players can still talk and report:

type: WHITELIST
commands:
  - msg
  - tell
  - r
  - reply
  - report
  - helpop
  - battlelog
  - bl

Or keep everything open and close only escapes:

type: BLACKLIST
commands:
  - spawn
  - home
  - homes
  - warp
  - tpa
  - tpahere
  - rtp
  - back
  - ec
  - enderchest

Picking up and dropping

File: ItemPrevent.yml.

KeyDefaultMeaning
disabledWorldsemptyWorlds where the module does nothing
defaultSettings.preventItemPickuptrueTagged players pick up nothing, no message
defaultSettings.preventItemDroptrueTagged players cannot drop items
defaultSettings.dropMessage"You cannot drop items while in combat."Sent when a drop is refused
defaultSettings.useBypassPermissiontrueWhether bypassPermission is checked
defaultSettings.bypassPermissionuxmpvpcore.bypass.itempreventPlayers with it may pick up and drop. Ops have it
perWorldSettingsemptySettings for one world, replacing defaultSettings there
eventPrioritySettings.itemPickup, itemDropNORMALWhen the plugin handles each

With pickup off, a tagged killer cannot take the loot until the tag ends 15 seconds later. If you use drop protection to give the killer the loot, set preventItemPickup: false.

Building

File: BuildPrevent.yml.

KeyDefaultMeaning
priorityNORMALWhen the plugin handles building
disabledWorldsemptyWorlds where tagged players build freely
defaultSettingsSettings for every world
perWorldSettingsemptySettings for one world, replacing defaultSettings there

In defaultSettings, and in each world:

KeyDefaultMeaning
preventBreaktrueLimit breaking
preventPlacetrueLimit placing
breakMode, placeModeALL_BLOCKSWhich blocks the limit covers
breakBlocks, placeBlocksemptyThe block list for WHITELIST and BLACKLIST
removeBreakDropstrueSee below
useBypassPermissionfalseWhether bypassPermission is checked
bypassPermissionuxmpvpcore.bypass.buildpreventPlayers with it build freely
breakMessage, placeMessage"You cannot break / place blocks while in combat."Sent when refused
ModeCovers
ALL_BLOCKSEvery block
WHITELISTEvery block except those in the list
BLACKLISTOnly the blocks in the list

removeBreakDrops changes what "limit breaking" means:

removeBreakDropsBreaking a covered block while tagged
true (default)Works, but the block drops no item and no XP. No message
falseIs refused, with breakMessage

Placing a covered block is always refused. Buckets of water and lava are not blocks to this module and are never stopped. For example, to let players place only cobwebs and obsidian while tagged and refuse all breaking:

defaultSettings:
  preventBreak: true
  preventPlace: true
  breakMode: ALL_BLOCKS
  placeMode: WHITELIST
  placeBlocks:
    - COBWEB
    - OBSIDIAN
  removeBreakDrops: false

Related: Combat Tag, Barrier, Item Cooldowns