NexusCombat splits its settings across two files, both generated automatically on first launch. config.yml holds every setting and messages.yml holds every chat message, action bar and menu title. Player data is saved in nexuscombat.db when using SQLite, and kills waiting to be saved are kept in nexuscombat-outbox.db so nothing is lost if the database goes down.

Storage

SettingDefaultDescription
storage.typesqlitesqlite or mysql
storage.refresh-seconds5How often online players' data is refreshed from the database, minimum 2
storage.mysql.urljdbc:mysql://127.0.0.1:3306/nexuscombatDatabase address
storage.mysql.usernamenexuscombatDatabase username
storage.mysql.password""Database password

Create the database before switching to MySQL. Every server sharing it must use the same player UUIDs, so all servers should be in online mode or behind the same proxy.

Combat Tagging

SettingDefaultDescription
combat.enabledtrueTag players when they fight
combat.seconds20How long a tag lasts
combat.action-bartrueShow the countdown on the action bar
combat.logout.punishmentKILLNONE, KILL, COMMANDS or KILL_AND_COMMANDS
combat.logout.credit-opponenttrueGive the opponent the kill when a player combat logs
combat.logout.commands[]Console commands run when a player combat logs
combat.blocked-commands12 commandsCommands players can't use while tagged
combat.teleports.blocktrueStop tagged players from teleporting
combat.teleports.allowed-causes[ENDER_PEARL]Teleport types still allowed while tagged

Logout commands support {player}, {uuid}, {opponent} and {opponent_uuid}. Blocked commands match the first word, so adding home also blocks /home base and /essentials:home.

Safe Zones and Barriers

SettingDefaultDescription
regions.enabledtrueStop tagged players entering WorldGuard regions with pvp set to deny
regions.barriers.enabledtrueShow glowing walls at safe zone edges
regions.barriers.radius4How far around the player walls are shown, 1 to 8 blocks
regions.barriers.refresh-ticks8How often walls update, 2 to 40 ticks
regions.barriers.materialRED_STAINED_GLASSBlock the walls are made from
regions.barriers.glow-color#ff4055Glow colour of the walls

Safe zones need WorldGuard and WorldEdit. Any region with pvp set to deny counts as a safe zone, and only the tagged player can see their own walls.

Items and Potions

SettingDefaultDescription
item-blocker.enabledtrueBlock items while tagged
item-blocker.materials5 itemsItems that can't be used while tagged
potion-bans.enabledtrueBlock potion effects while tagged
potion-bans.effects[minecraft:strength, minecraft:regeneration]Effects that can't be applied while tagged
item-cooldowns.enabledtrueGive items cooldowns
item-cooldowns.combat-onlyfalseOnly start cooldowns when the item is used in combat
item-cooldowns.seconds5 itemsCooldown for each item, 1 to 86400 seconds, 0 disables it

If an item is both blocked and on cooldown, the block takes priority while tagged. Banned potion effects are blocked from every source, so banning regeneration also stops golden apple regeneration and beacon effects while tagged.

Protection and PvP Toggle

SettingDefaultDescription
newbie-protection.enabledtrueProtect players from PvP on their first join
newbie-protection.seconds300How long protection lasts
newbie-protection.action-bartrueShow remaining protection on the action bar
pvp-toggle.enabledtrueLet players turn their PvP on or off
pvp-toggle.default-enabledtrueWhether new players start with PvP on
pvp-toggle.cooldown-seconds30Time players must wait between changes

Protection counts down in real time, including while the player is offline.

Stats, Death Messages and Recaps

SettingDefaultDescription
statistics.enabledtrueTrack kills, deaths, K/D and streaks
statistics.count-environmental-deathsfalseCount deaths from falls, lava and mobs as deaths
leaderboards.enabledtrueTurn /pvptop on
death-messages.enabledtrueReplace PvP death messages with NexusCombat ones
death-messages.default-visibletrueWhether new players see death messages
kill-recap.enabledtrueShow the killer their victim's health, weapon, armor and effects

Commands

SettingDefaultDescription
commands.gui.enabledtrueUse menus for stats and leaderboards, false always uses chat
commands.<command>.enabledtrueTurn a command on or off
commands.<command>.nameper commandMain command name
commands.<command>.aliasesper commandExtra names for the command
commands.<command>.permissionper commandPermission needed, separate several with ; to allow any of them
CommandNameAliasesPermission
combatcombatnexuscombatnexuscombat.use
pvppvppvptogglenexuscombat.toggle
statspvpstatscombatstatsnexuscombat.stats
toppvptopcombattopnexuscombat.top
deathmessagesdeathmessagespvpdeathmessagesnexuscombat.deathmessages

If another plugin already uses a command name, NexusCombat leaves it alone and registers its command as /nexuscombat:<name> instead.

Default Config File

yaml
storage:
  type: sqlite
  refresh-seconds: 5
  mysql:
    url: 'jdbc:mysql://127.0.0.1:3306/nexuscombat'
    username: 'nexuscombat'
    password: ''

combat:
  enabled: true
  seconds: 20
  action-bar: true
  logout:
    punishment: KILL
    credit-opponent: true
    commands: []
  blocked-commands: [spawn, home, homes, warp, warps, tpa, tpahere, tpaccept, back, hub, lobby, server]
  teleports:
    block: true
    allowed-causes: [ENDER_PEARL]

regions:
  enabled: true
  barriers:
    enabled: true
    radius: 4
    refresh-ticks: 8
    material: RED_STAINED_GLASS
    glow-color: '#ff4055'

item-blocker:
  enabled: true
  materials: [ELYTRA, ENDER_PEARL, GOLDEN_APPLE, ENCHANTED_GOLDEN_APPLE, BOW]

potion-bans:
  enabled: true
  effects: [minecraft:strength, minecraft:regeneration]

item-cooldowns:
  enabled: true
  combat-only: false
  seconds:
    GOLDEN_APPLE: 8
    ENCHANTED_GOLDEN_APPLE: 30
    ENDER_PEARL: 12
    TRIDENT: 4
    MACE: 3

newbie-protection:
  enabled: true
  seconds: 300
  action-bar: true

pvp-toggle:
  enabled: true
  default-enabled: true
  cooldown-seconds: 30

statistics:
  enabled: true
  count-environmental-deaths: false

leaderboards:
  enabled: true

death-messages:
  enabled: true
  default-visible: true

kill-recap:
  enabled: true

commands:
  gui:
    enabled: true
  combat:
    enabled: true
    name: combat
    aliases: [nexuscombat]
    permission: nexuscombat.use
  pvp:
    enabled: true
    name: pvp
    aliases: [pvptoggle]
    permission: nexuscombat.toggle
  stats:
    enabled: true
    name: pvpstats
    aliases: [combatstats]
    permission: nexuscombat.stats
  top:
    enabled: true
    name: pvptop
    aliases: [combattop]
    permission: nexuscombat.top
  deathmessages:
    enabled: true
    name: deathmessages
    aliases: [pvpdeathmessages]
    permission: nexuscombat.deathmessages

Restart the server after editing any file. There is no reload command.

Messages

KeyDefault
prefix&#FF4055&lNexusCombat &8» &r
combat-start&cYou are in combat with {opponent}. &7Stay online for {seconds}s.
combat-end&aYou are out of combat.
combat-action-bar&c&lIN COMBAT &8· &f{seconds}s
combat-command-blocked&cYou cannot use that command during combat.
combat-teleport-blocked&cYou cannot teleport during combat.
region-blocked&cYou cannot enter a safe zone during combat.
item-blocked&cThat item is blocked during combat.
item-cooldown&cThat item is still on cooldown.
potion-blocked&cThat potion effect is blocked during combat.
protection-action-bar&a&lPVP PROTECTION &8· &f{seconds}s
pvp-enabled&aYour PvP is enabled.
pvp-disabled&eYour PvP is disabled.
pvp-toggle-cooldown&eYou can change PvP again in {seconds}s.
death-pvp&c{victim} &7was killed by &c{killer}&7 with &f{weapon}&7.
death-combat-logout&c{victim} &7logged out in combat against &c{killer}&7.
kill-recap`&f{victim} &8&c{health} HP &7before defeat &8&7Held item &f{weapon} &8&7Armor &f{armor} &8&7Effects &f{effects}`
status`&7PvP &f{pvp} &8&7Protection &f{protection}s &8&7Combat &f{combat}s`
stats-summary`&f{player} &8&7Kills &f{kills} &8&7Deaths &f{deaths} &8&7K/D &f{kd} &8&7Streak &f{streak} &8&7Best &f{best_streak}`
top-entry&8#{position} &f{player} &8» &c{value}
gui-stats-title&8PvP stats &7· &f{player}
gui-top-title&8Leaderboard &7· &f{metric}

The Messages table shows the main ones. messages.yml has every message, including the PvP denial messages, command replies, menu item names and leaderboard names. Messages support & colour codes and hex colours written as &#RRGGBB, and any message set to '' is turned off. The prefix is added in front of every chat message automatically.