Configuration

Everything is in two files, config.yml and messages.yml. Run /combat reload after a change. Storage changes need a restart.

General

Each setting is shown exactly as it is in the default file, so you can search for it. Every value can be changed.

SettingMeaning
combat-time: 20How long a player stays in combat after a hit, in seconds.
block-teleports: trueStop teleports from commands and plugins in combat. See Teleports.
disabled-worlds: []Worlds where combat is turned off.
kill-messages: trueReplace the vanilla death message with kill-message when a player kills another player. See Kill messages.
death-messages: trueReplace the vanilla death message with death-messages for every other death. See Death messages.

Storage

These are under storage:. Changing them needs a restart. See Storage.

SettingMeaning
type: sqlitesqlite, mysql, mariadb, postgresql or mongodb.
table-prefix: "combatlog_"Prefix for every table or collection.
host: localhost
port: 3306
database: combatlog
username: root
password: ""
use-ssl: false
pool-size: 4
The database server for mysql, mariadb and postgresql, under sql:.
uri: "mongodb://localhost:27017"
database: combatlog
The MongoDB server, under mongodb:.

Timer resets

These are under timer-resets:. full means combat-time, a number is seconds. See Timer resets.

SettingMeaning
hit: fullHitting another player or getting hit.
ender-pearl: fullThrowing an ender pearl.
firework-damage: fullA firework that damages a player.
firework-boost: fullUsing a firework to boost an elytra.

Countdown sound

These are under countdown-sound:. See What players see and hear.

SettingMeaning
enabled: truePlay a tick sound in the last seconds of combat.
seconds: 3How many of the last seconds tick.
sound: "block.note_block.hat 1.0 1.6"The sound, volume and pitch, or "none".

Item cooldowns

These are under item-cooldowns:. A number is the cooldown in seconds, -1 blocks the item in combat. See Item cooldowns.

SettingMeaning
ENDER_PEARL: 15Cooldown for ender pearls in combat, in seconds.
ELYTRA: -1-1: no elytra gliding in combat. A number is the time between two glides.
item-cooldowns: {}Turns every item cooldown off. Replace the whole section with this line.

Blocked potions

These are under potion-blocking:. See Potions.

SettingMeaning
effects:Effects players can’t have in combat. INVISIBILITY by default.
on-use: blockblock: potions with a blocked effect can’t be used in combat. save: they work, and the blocked effects wait until combat ends.

Command blocking

These are under command-blocking:. See Commands.

SettingMeaning
mode: blacklistblacklist blocks the listed commands, whitelist allows only the listed commands.
commands:The commands, without the slash. spawn, home, tpa, rtp, warp and back by default.

Safe zones

These are under safe-zones:. Needs WorldGuard. See Safe zones.

SettingMeaning
regions:WorldGuard regions players can’t enter in combat. spawn by default.
pvp-off-regions: trueEvery region with pvp set to deny is a safe zone too.
color: "#FF3B3B"
opacity: 55
Color of the wall panels and how solid they get, from 0 to 100. Under wall:.
outline: true
outline-color: "#FF5555"
The glowing outline around every panel and its color. Under wall:.
view-distance: 6How close a player has to be to see the wall, in blocks. Under wall:.

Boss bar

These are under bossbar:.

SettingMeaning
enabled: falseShow the combat timer as a boss bar too. Set enabled: true to turn it on.
color: BLUEPINK, BLUE, RED, GREEN, YELLOW, PURPLE or WHITE.
style: PROGRESSPROGRESS, NOTCHED_6, NOTCHED_10, NOTCHED_12 or NOTCHED_20.

Kill streaks and anti-farm

See Stats.

SettingMeaning
broadcast-at: [5, 10, 15, 20, 25, 50]Kill streaks that send kill-streak to everyone. Under kill-streaks:.
enabled: false
minutes: 10
Kills on the same player within this many minutes don’t count. Under anti-farm:.

Messages

In messages.yml. Colors with &a, &c, &l and so on, HEX colors with &#RRGGBB. Leave a message empty ("") to not send it. Every message also has a sound under sounds:, see Sounds.

When a plugin update adds a new message, it is added to your messages.yml with its comment when the server starts or on /combat reload. New messages go at the end of the file, and new entries under death-messages: or sounds: go at the end of that section. Messages you changed stay as they are. The console shows Added new messages to messages.yml: ....

MessageWhen it’s sent
action-barAbove the hotbar while in combat. {time} counts down in whole seconds.
bossbar-titleThe boss bar title, when the boss bar is on. {time}.
combat-entered
combat-left
In chat when a player enters or leaves combat. Empty by default.
combat-loggedTo everyone when a player leaves in combat. {player}.
combat-logged-titleBig text on the screen of a player who logged out in combat, after they click Respawn. The part before \n is the title, the part after it is the line below.
command-blocked
teleport-blocked
A command or teleport was blocked.
item-blocked
elytra-blocked
An item set to -1 or the elytra was used in combat.
safezone-blockedA player in combat touched the safe zone wall or tried to get into a safe zone.
potion-removed
potion-restored
potion-blocked
Blocked potion effects were taken away, given back, or a blocked potion was used. {effects}.
status-in-combat
status-not-in-combat
Replies to /combat. {time}.
stats, stats-not-found, stats-reset, stats-unavailableReplies to /combat stats and /combat resetstats. {player}, {kills}, {deaths}, {kd}, {streak}, {best_streak}.
kill-streakTo everyone when a player reaches a kill streak from broadcast-at. {player}, {streak}.
kill-message
kill-message-no-weapon
Instead of the vanilla message when a player kills another player. {victim}, {killer}, {weapon}, {killer_health}.
death-messages:Instead of the vanilla message for every other death. {victim}, {mob}.
check-in-combat, check-not-in-combat, removed, reloaded, no-permission, player-not-found, player-only, usageReplies to the admin commands. {player}, {time}.

Default config

yaml
# Paste your license key below, then restart the server.
# No key yet? Join my Discord: https://discord.gg/nRjDw9k2vJ
license-key: "AP-XXXX-XXXX-XXXX-XXXX"

# Where kills, deaths and kill streaks are saved. Changing this needs a restart.
storage:
  # sqlite, mysql, mariadb, postgresql or mongodb. Use mysql, mariadb, postgresql or mongodb when several servers share stats.
  type: sqlite
  # Prefix for every table or collection.
  table-prefix: "combatlog_"
  # Used by mysql, mariadb and postgresql. PostgreSQL usually runs on port 5432.
  sql:
    host: localhost
    port: 3306
    database: combatlog
    username: root
    password: ""
    use-ssl: false
    pool-size: 4
  mongodb:
    uri: "mongodb://localhost:27017"
    database: combatlog

# How long a player stays in combat after a hit, in seconds.
combat-time: 20

# What each action sets the combat timer back to, in seconds. "full" means combat-time.
# Pearls and fireworks only reset a timer that is already running.
timer-resets:
  hit: full
  ender-pearl: full
  firework-damage: full
  firework-boost: full

# A tick sound in the last seconds of combat.
countdown-sound:
  enabled: true
  seconds: 3
  # "sound volume pitch", or "none".
  sound: "block.note_block.hat 1.0 1.6"

# Cooldowns while in combat, in seconds. -1 means the item can't be used in combat.
# Item names are the Minecraft item IDs, for example ENDER_PEARL, GOLDEN_APPLE or WIND_CHARGE.
# ELYTRA: -1 stops gliding. A number is the time between two glides.
# To remove one cooldown, delete its line. To turn all cooldowns off, use: item-cooldowns: {}
item-cooldowns:
  ENDER_PEARL: 15
  ELYTRA: -1

# Potion effects players can't have in combat, for example INVISIBILITY, SPEED or STRENGTH.
# When combat starts these effects are taken away and saved. When combat ends, the time they had left is given back.
# Nothing is given back after a death. To turn this off, use: effects: []
potion-blocking:
  effects:
    - INVISIBILITY
  # What happens when a player in combat uses a potion with one of these effects.
  # block: the potion can't be drunk or thrown and stays in the inventory.
  # save: the potion works, but the blocked effects are saved and given after combat.
  on-use: block

# Commands in combat. blacklist blocks the listed commands, whitelist allows only the listed commands.
command-blocking:
  mode: blacklist
  commands:
    - spawn
    - home
    - tpa
    - rtp
    - warp
    - back

# Stop teleports from commands and plugins while in combat. Pearls and chorus fruit are not affected.
block-teleports: true

# WorldGuard regions players can't enter while in combat. No combat starts inside them, and players can't hit or
# shoot into or out of them. A child or higher-priority region with pvp set to allow, like an arena in spawn, is not safe.
safe-zones:
  regions:
    - spawn
  # Also make every WorldGuard region with pvp set to deny a safe zone.
  pvp-off-regions: true
  # The wall a player in combat sees at the edge of a safe zone. Only that player sees it.
  wall:
    # Panel color, as HEX.
    color: "#FF3B3B"
    # How solid the panels get right next to the wall, from 0 to 100.
    opacity: 55
    # A glowing outline around every panel.
    outline: true
    outline-color: "#FF5555"
    # How close a player has to be to see the wall, in blocks.
    view-distance: 6

# Worlds where combat is turned off.
disabled-worlds: []

# Show the combat timer as a boss bar too.
bossbar:
  enabled: false
  # PINK, BLUE, RED, GREEN, YELLOW, PURPLE or WHITE
  color: BLUE
  # PROGRESS, NOTCHED_6, NOTCHED_10, NOTCHED_12 or NOTCHED_20
  style: PROGRESS

# Replace the vanilla death message with kill-message from messages.yml when a player kills another player.
kill-messages: true
# Replace the vanilla death message with death-messages from messages.yml for every other death.
death-messages: true

# Send kill-streak from messages.yml to everyone when a player reaches one of these kill streaks.
kill-streaks:
  broadcast-at: [5, 10, 15, 20, 25, 50]

# Kills on the same player within this many minutes don't count for kills, deaths or kill streaks.
anti-farm:
  enabled: false
  minutes: 10

Default messages

yaml
# Colors: &a, &c, &l ... and &#RRGGBB for HEX colors.
# Leave a message empty ("") to not send it.

# Shown above the hotbar while in combat. {time} counts down in whole seconds.
action-bar: "&7Combat: &#00A6FF{time}s"
# Boss bar title, when the boss bar is turned on in config.yml.
bossbar-title: "&7Combat: &#00A6FF{time}s"

# Sent in chat when a player enters or leaves combat.
combat-entered: ""
combat-left: ""

# Sent to everyone when a player leaves in combat. {player}
combat-logged: "&#FF5555{player} &7logged out in combat and died."

# Shown in big text to a player who logged out in combat, after they click Respawn.
# The part before \n is the big title, the part after it is the smaller line below.
combat-logged-title: "&7You died\n&7You logged out of combat."

command-blocked: "&cYou can't use that command in combat."
teleport-blocked: "&cYou can't teleport in combat."
item-blocked: "&cYou can't use that in combat."
elytra-blocked: "&cYou can't use an elytra in combat."
safezone-blocked: "&cYou can't enter a safe zone in combat."

# Blocked potion effects, see potion-blocking in config.yml. {effects}
potion-removed: "&7Removed &#00A6FF{effects} &7until combat ends."
potion-restored: "&7Gave back &#00A6FF{effects}&7."
potion-blocked: "&cYou can't use that potion in combat."

# /combat
status-in-combat: "&7You are in combat for &#00A6FF{time}s&7."
status-not-in-combat: "&7You are not in combat."

# /combat check, /combat remove, /combat reload. {player}, {time}
check-in-combat: "&#00A6FF{player} &7is in combat for &#00A6FF{time}s&7."
check-not-in-combat: "&#00A6FF{player} &7is not in combat."
removed: "&7Removed &#00A6FF{player} &7from combat."
reloaded: "&7CombatLog reloaded."
no-permission: "&cYou don't have permission to do that."
player-not-found: "&cNo online player called {player}."
player-only: "&cOnly players can do that."
usage: "&7Use &#00A6FF/combat&7, &#00A6FF/combat stats [player]&7, &#00A6FF/combat check <player>&7, &#00A6FF/combat remove <player>&7, &#00A6FF/combat resetstats <player>&7 or &#00A6FF/combat reload&7."

# /combat stats and /combat resetstats. {player}, {kills}, {deaths}, {kd}, {streak}, {best_streak}
stats: "&#00A6FF{player} &8| &7Kills &f{kills} &8| &7Deaths &f{deaths} &8| &7K/D &f{kd} &8| &7Streak &f{streak} &8(&7best &f{best_streak}&8)"
stats-not-found: "&cNo stats found for {player}."
stats-reset: "&7Reset the stats of &#00A6FF{player}&7."
stats-unavailable: "&cStats are not available right now."

# Sent to everyone when a player reaches a kill streak from config.yml. {player}, {streak}
kill-streak: "&#FFB800⚔ &f{player} &7is on a &#FFB800{streak} &7kill streak!"

# Replaces the vanilla death message when a player kills another player.
# {victim}, {killer}, {weapon} (hover to see the item), {killer_health} (hearts left)
kill-message: "&#FF5555☠ &f{victim} &7was killed by &f{killer} &7with &f{weapon}"
# The same, when the killer had nothing in their hand.
kill-message-no-weapon: "&#FF5555☠ &f{victim} &7was killed by &f{killer}"

# Replaces the vanilla death message for every other death. {victim}, and {mob} for mob.
death-messages:
  fall: "&#FF5555☠ &f{victim} &7fell from a high place"
  void: "&#FF5555☠ &f{victim} &7fell out of the world"
  lava: "&#FF5555☠ &f{victim} &7tried to swim in lava"
  fire: "&#FF5555☠ &f{victim} &7burned to death"
  drowning: "&#FF5555☠ &f{victim} &7drowned"
  explosion: "&#FF5555☠ &f{victim} &7blew up"
  mob: "&#FF5555☠ &f{victim} &7was killed by &f{mob}"
  other: "&#FF5555☠ &f{victim} &7died"

# The sound for each message: "sound volume pitch", or "none" for no sound.
# Sounds play even when the message itself is empty. Sounds of messages sent to everyone play for everyone.
sounds:
  combat-entered: "block.note_block.bass 1.0 0.6"
  combat-left: "block.note_block.chime 0.8 1.4"
  combat-logged: "none"
  combat-logged-title: "block.note_block.bass 1.0 0.5"
  command-blocked: "block.note_block.bass 0.6 0.8"
  teleport-blocked: "block.note_block.bass 0.6 0.8"
  item-blocked: "block.note_block.bass 0.6 0.8"
  elytra-blocked: "block.note_block.bass 0.6 0.8"
  safezone-blocked: "block.amethyst_block.hit 1.0 0.7"
  potion-removed: "block.brewing_stand.brew 0.6 1.2"
  potion-restored: "entity.experience_orb.pickup 0.6 1.4"
  potion-blocked: "block.note_block.bass 0.6 0.8"
  status-in-combat: "none"
  status-not-in-combat: "none"
  check-in-combat: "none"
  check-not-in-combat: "none"
  removed: "none"
  reloaded: "none"
  no-permission: "none"
  player-not-found: "none"
  player-only: "none"
  usage: "none"
  stats: "none"
  stats-not-found: "none"
  stats-reset: "none"
  stats-unavailable: "none"
  kill-streak: "entity.player.levelup 0.5 1.5"
  kill-message: "none"
  kill-message-no-weapon: "none"
  death-messages: "none"