Combat
Stop players from escaping a fight by logging out, running a command or teleporting away.
The Combat module puts players "in combat" when they fight another player. While they are in combat, they cannot teleport away, use most commands or fly, and logging out can cost them their life.
This module requires the complete edition. See editions.
Features
- Combat tag. When a player hurts another player, both are put in combat. Hits with arrows and other projectiles, TNT lit by a player, lingering potion clouds and tamed animals count too, and are traced back to the player behind them.
- Timer reset on every hit. The combat lasts a set time after the last hit dealt or taken. Players get a chat message when they enter combat and another one when it ends.
- Countdown in the action bar. The remaining seconds are shown above the hotbar while the player is in combat.
- Command block. Every command is refused during combat, except the ones you allow (by default
/msg,/tell,/rand/reply). - Teleport block. Teleports from the teleport module (spawn, homes, warps,
/back,/tpa), the/ascendand/jumpcommands of the comfort module and the clan home are refused during combat. A teleport that is still warming up is cancelled if the player enters combat before it ends. - No flight. A player who can fly loses flight as soon as they enter combat and cannot turn it back on until the fight is over.
- Combat logging. A player who logs out while in combat can be killed on the spot (so their items drop) and the logout can be announced to the whole server.
- Death clears the tag. A player who dies is no longer in combat.
Players in creative or spectator mode are never put in combat.
Setting it up
Open the Combat module in the web editor. Settings are grouped in three sections.
| Setting | What it does | Default |
|---|---|---|
| Tagging | ||
| Combat duration | How long a player stays in combat after the last hit dealt or taken. | 15s |
| Countdown | Shows the remaining combat time in the action bar. | On |
| During combat | ||
| Block teleport | Refuses teleports while the player is in combat. | On |
| Disable flight | Removes flight when the player enters combat and blocks it until the end. | On |
| Allowed commands | Commands that still work in combat, written without the leading /. Every other command is blocked. |
msg, tell, r, reply |
| Logging out in combat | ||
| Kill the player | Kills a player who logs out while in combat. | On |
| Announce | Tells every online player who logged out in combat. | On |
The messages players see (entering combat, leaving combat, blocked command, blocked teleport, countdown and logout announcement) can be changed in the Messages page of the editor.
Commands
This module has no commands.
Permissions
| Permission | What it grants |
|---|---|
inglis.combat.bypass |
Never put in combat. Operators have it by default. |
Placeholders
| Placeholder | Value |
|---|---|
%ingliscore_combat% |
true if the player is in combat, otherwise false. |
%ingliscore_combat_time% |
Seconds of combat left, 0 when not in combat. |
See placeholders for how to use them.
Tips
Operators bypass the combat tag by default. To test the module, use an account that is not an operator, or remove inglis.combat.bypass from your staff in your permissions plugin.
- Commands are matched by name, so a command typed with a plugin prefix (for example
/essentials:msg) is treated like/msg. Add each alias you want to allow, such asworwhisper. %ingliscore_combat_time%works well in a scoreboard line so players always see how long they must wait.