RXKOTH / DOCUMENTATION / 1.0.0

Your first hill.
A clear starting point.

Install RXKoth, create an arena, and keep your statistics locally. MySQL is optional.

01 / GET STARTED

Installation

  1. Back up your server. Keep a copy of existing RXKoth configuration and statistics before upgrading.
  2. Download the JAR. Get RXKoth 1.0.0 exclusively from SpigotMC, then place the JAR in your server’s plugins folder. Replace an older RXKOTH JAR instead of keeping both.
  3. Restart the server. Configuration files are created on first start. Use rxkoth.admin for setup.
The build targets Paper 1.18.2 with Java 17 bytecode. Run the Java version required by your Paper server. PlaceholderAPI is optional. Live-tested on Purpur 1.18.2 (Java 17), Paper 1.19.4 (Java 17), Paper 1.20.4 (Java 17), and Paper 1.21.1 (Java 21). The final JAR passed 49 automated tests and 25 live checks per server version with two automated clients. Other patches and optional integrations need separate testing.

View the complete default config.yml. Existing configuration choices are preserved. On an upgrade, set the new options below explicitly if you want the fresh-install defaults.

02 / SELECT YOUR REGION

Create your first arena

Run /koth wand. Left-click one corner and right-click the opposite corner, including the height players should occupy. Then run:

/koth create arena
/koth setmode arena capture
/koth start arena

Use /koth gui to edit settings, including duration and capture time. Stop the event with /koth stop arena. Players already standing inside are checked when an event starts.

03 / CHOOSE THE CONTEST

Event modes

ModeHow it works
scoreThe selected eligible holder earns points while controlling the region. The highest score determines the winner when time expires.
captureThe selected eligible holder must keep the region for the capture time. Losing the holder resets progress. With PvP blocking enabled, multiple eligible players contest and reset capture. Reaching the capture target on the final event second counts.
multiSeparate parts have their own capture progress and owners. Add parts through /koth zones or the admin GUI.

Change a mode with /koth setmode arena score, capture, or multi. Use the GUI to configure rewards and event settings before starting.

04 / RESPONSIVE CAPTURE

Capture checks and timing

performance:
  tick-interval: 5
  scoreboard-update-ticks: 20

protection:
  deny-combat-capture: false
  combat-tag-seconds: 15
  afk-timeout-seconds: 0
  deny-spectator-capture: true

The fresh-install capture check runs every 5 server ticks, about 0.25 seconds at 20 TPS. Accepted intervals are clamped to 1–20 ticks. Capture progress and point awards still advance once per 20 server ticks, so faster checks do not speed up the event. Server lag can lengthen real-world timing.

With deny-combat-capture: false (default), the first eligible entrant keeps capturing. Later arrivals cannot pause or take over their progress. Leaving, death, disconnecting, or becoming ineligible releases the hill to the earliest eligible player still inside. Leaving and returning loses entry priority. The rule applies to score, capture, and each multi part.

With deny-combat-capture: true, damaging PvP hits block capture for combat-tag-seconds after the last hit. Set it to 5 for a five-second wait. Both attacker and victim are tagged, including player-fired projectiles. Cancelled hits, zero damage, mobs, and self-hits do not count. Multiple eligible players contest the region in this mode. A duration of 0 removes the wait while keeping contested-region rules. This switch controls capture, not the server’s PvP damage setting.

Spectator protection remains enabled by default. AFK blocking is optional: afk-timeout-seconds: 0 disables it on fresh installs; a positive value enables it. rxkoth.bypass bypasses these eligibility checks and is granted to operators by default; dead players cannot capture.

Movement and teleport events preserve observed entry order. If several players are already inside when tracking starts, their earlier entry order is unknown and the initial tie is resolved by UUID.

If a player cannot capture, check the region’s height, the current holder, any configured AFK timeout, spectator mode, and the PvP restriction you enabled. Bossbars and scoreboards can update at a different interval from capture checks.

05 / KEEP THE RESULTS

Leaderboards without MySQL

Stand where the board should appear and use:

/koth leaderboard place arena-wins wins
/koth leaderboard place arena-points points
/koth leaderboard refresh

Available statistics are captures, wins, points, and kills. Boards rank the server’s recorded totals across events. Statistics are tracked by player UUID, so a name change does not create a second player.

Results update the in-memory ranking immediately. The board checks for changes once per second and reuses existing rows. The periodic full refresh defaults to 10 minutes; it does not delay new results.

/koth leaderboard move arena-wins
/koth leaderboard delete arena-wins
/koth leaderboard refreshrate 10

Move uses your current position. A manual refresh updates all boards immediately. Stored statistics are loaded at startup and survive a clean restart when writes succeed.

06 / CHOOSE YOUR STORAGE

Local first. MySQL optional.

storage:
  enabled: false
  type: mysql
  fallback-file: stats.yml

enabled: false disables MySQL, not statistics. RXKoth saves to plugins/RXKOTH/stats.yml by default. Rankings and boards work in this mode.

To use MySQL, enable storage, keep type: mysql, and set the host, port, database, username, password, pool size, and SSL option in config.yml. Restart after changing the backend. If MySQL cannot initialize at startup, RXKoth falls back to local YAML and logs a warning.

Runtime saves run in the background. Failed writes are retried while the plugin is running. Local saves use a temporary file and replacement to avoid partially written statistics. A crash or a storage failure that continues through shutdown can still lose unsaved results; keep backups and check the console for errors.

The ranking view is local to this running server and is loaded when storage starts. Changes made by another server or an external database editor are not synchronized into that view live. Switching storage backends does not automatically migrate old statistics.
07 / QUICK REFERENCE

Commands and permissions

CommandPurpose
/koth help textShow the command list.
/koth guiOpen the administration interface.
/koth wandGet the region selection wand.
/koth create <id>Create an arena from the selection.
/koth setmode <id> <mode>Choose score, capture, or multi.
/koth start <id>Start an event.
/koth stop <id>Stop an event.
/koth reloadReload plugin configuration.

Management commands require rxkoth.admin and default to operators. /koth gui and /koth edit also accept rxkoth.gui.admin. Help uses rxkoth.help or rxkoth.help.text. Playing in an event does not require an administrative permission.

08 / MAKE IT YOURS

Layouts and integrations

Edit layout.yml for bossbar, scoreboard, tab, and hologram presentation. Fresh installations use the RXKoth red accent (#ff1e00); existing custom layouts remain yours.

Configure rewards and daily or cron schedules through the GUI or command help. Optional PlaceholderAPI values reflect current event state. The optional Kingdoms name display uses a configured PlaceholderAPI expression; it is not a team-based capture system.

Discord webhooks are optional and configured in webhooks.yml. Keep webhook URLs and database passwords private.

09 / FILE REFERENCE

Configuration files

Files are stored in plugins/RXKOTH/. Back them up before editing. Use the admin GUI or commands for arena changes; avoid editing arena files while an event is running.

FileContents
config.ymlStorage, capture protection, performance, wand, and starter item settings.
koths.ymlArena regions, modes, timings, rewards, schedules, and extra zones.
layout.ymlBossbar, scoreboard, tab, and hologram text, with optional per-arena overrides.
webhooks.ymlOptional Discord webhook connection, queue, and event templates.
stats.ymlDefault local statistics file. Its name is configurable.

/koth reload stops active events without rewarding winners, clears wand selections, reloads configuration and presentation services, and restarts the scheduler. Reload between events. Change the storage backend with a full restart. Existing settings are preserved when upgrading.

Default config.yml — RXKoth 1.0.0
debug: false

storage:
  enabled: false
  # MySQL is the only database mode. If disabled or unavailable, RXKOTH stores stats in local YAML files.
  type: mysql
  fallback-file: stats.yml
  host: localhost
  port: 3306
  database: rxkoth
  username: root
  password: ''
  pool-size: 8
  use-ssl: false

kingdomsx:
  enabled: false
  # Requires PlaceholderAPI. This placeholder is resolved for the capturer/top player.
  name-placeholder: '%kingdoms_kingdom_name%'
  fallback-to-player-name: true

performance:
  # Poll capture state every 1-20 server ticks. Timers stay measured in seconds.
  tick-interval: 5
  scoreboard-update-ticks: 20
  async-database: true
  particle-preview-interval: 20
  particle-view-distance: 48
  particle-max-points: 320
  leaderboard-refresh-minutes: 10

protection:
  # Seconds without block movement before AFK capture protection applies; 0 disables it.
  afk-timeout-seconds: 0
  # Wait this many seconds after the last damaging PvP hit (melee or player projectile).
  # Used only when deny-combat-capture is true. 0 means no waiting time.
  combat-tag-seconds: 15
  # true: PvP-tagged players cannot capture; multiple eligible players contest the hill.
  # false: the first eligible entrant keeps capturing until they leave, die, disconnect,
  # or become ineligible (AFK/spectator). Later arrivals do not pause their progress.
  deny-combat-capture: false
  deny-spectator-capture: true

wand:
  material: GOLDEN_AXE
  name: '<#ff1e00><bold>RXKOTH Wand</bold>'
  lore:
    - '<gray>Left click: first corner'
    - '<gray>Right click: second corner'

starter-item:
  material: NETHER_STAR
  custom-model-data: 4696
  name: '<#ff1e00><bold>Start %koth%</bold>'
  lore:
    - '<gray>Right click to start this KOTH.'

# Webhook settings moved to webhooks.yml.
# Scoreboard, tab, bossbar and hologram layouts moved to layout.yml.
Default layout.yml — RXKoth 1.0.0
default:
  tab:
    header: '\n<#ff1e00><bold>RXKOTH</bold> <dark_gray>| <white>%koth%\n<gray>Mode: <#ff1e00>%mode%'
    footer: '<dark_gray>----------------\n<gray>Capturer: <white>%capturer% <dark_gray>| <gray>Time: <white>%time%\n<#ff1e00>%server%'
  bossbar:
    title:
      SCORE: '<#ff1e00><bold>%koth%</bold> <dark_gray>| <white>%capturer% <dark_gray>| <#ffd166>%points% pts <dark_gray>| <#d7e6ff>%time%'
      CAPTURE: '<#ff1e00><bold>%koth%</bold> <dark_gray>| <white>%capturer% <dark_gray>| <#ff1e00>%capture_percent%%'
      MULTI: '<#ff1e00><bold>%koth%</bold> <dark_gray>| <white>%multi_captured%/%multi_total% parts <dark_gray>| <#ff1e00>%multi_top%'
  hologram:
    title: '<#ff1e00><bold>%koth%</bold> <dark_gray>[%mode%]'
    capturer: '<gray>Capturing: <white>%capturer%'
    zone-title: '<#ff1e00><bold>%zone%</bold> <dark_gray>| <white>%koth%'
    zone-state: '<#ff1e00>%zone_percent%% <dark_gray>| <white>%zone_state% <dark_gray>| <white>%zone_holder%'
  scoreboard:
    title:
      SCORE: '<#ff1e00><bold>SCORE KOTH'
      CAPTURE: '<#ff1e00><bold>CAPTURE KOTH'
      MULTI: '<#ff1e00><bold>MULTI KOTH'
    zone-lines:
      - '<#d7e6ff>%zone% <dark_gray>» <white>%zone_percent%%'
      - '<dark_gray>  %zone_state% <gray>by <white>%zone_holder%'
    lines:
      SCORE:
        - '<dark_gray>------------'
        - '<#ff1e00>Location:'
        - '<#d7e6ff>%location%'
        - ' '
        - '<#ff1e00>Capturer:'
        - '<#d7e6ff>%capturer%'
        - '<#ff1e00>Points: <white>%points%'
        - '<gray>You: <white>%viewer_points%'
        - '<#ff1e00>Ends in'
        - '<#d7e6ff>%time%'
        - '<dark_gray>------------'
        - '<#ff1e00>%server%'
      CAPTURE:
        - '<dark_gray>------------'
        - '<#ff1e00>Location:'
        - '<#d7e6ff>%location%'
        - ' '
        - '<#ff1e00>Capturer:'
        - '<#d7e6ff>%capturer%'
        - '<#ff1e00>Capture:'
        - '<#d7e6ff>%capture_percent%%'
        - '<dark_gray>------------'
        - '<#ff1e00>%server%'
      MULTI:
        - '<dark_gray>------------'
        - '<#ff1e00>Multi KOTH Parts:'
        - '%zone_lines%'
        - ' '
        - '<#ff1e00>Captured: <white>%multi_captured%/%multi_total%'
        - '<#ff1e00>Top: <white>%multi_top%'
        - '<dark_gray>------------'
        - '<#ff1e00>%server%'

# Optional per-KOTH override example:
# koths:
#   arena:
#     scoreboard:
#       title:
#         SCORE: '<#ff1e00><bold>ARENA SCORE'
Default webhooks.yml — RXKoth 1.0.0
enabled: false
url: ''

queue:
  min-delay-ms: 1200
  max-retries: 3

embed:
  title: 'RXKOTH - %event%'
  description: '%description%'
  color: '#ff1e00'
  timestamp: true
  thumbnail: true
  footer: '%server%'
  fields:
    - 'KOTH: %koth%'
    - 'Mode: %mode%'
    - 'Player: %player%'
    - 'Server: %server%'

events:
  koth-start:
    enabled: true
    embed:
      title: 'KOTH Started'
      description: '%koth% has started.'
      color: '#ff1e00'
  koth-stop:
    enabled: true
    embed:
      title: 'KOTH Stopped'
      description: '%koth% has stopped.'
      color: '#ffd166'
  capture-start:
    enabled: true
    embed:
      title: 'Capture Started'
      description: '%player% started capturing %koth%.'
      color: '#ff1e00'
  capture-stop:
    enabled: true
    embed:
      title: 'Capture Stopped'
      description: '%player% stopped capturing %koth%.'
      color: '#f97316'
  capture-complete:
    enabled: true
    embed:
      title: 'Capture Complete'
      description: '%player% captured %koth%.'
      color: '#ff1e00'
10 / ACCESS

Permissions in practice

NodeDefaultBehavior
rxkoth.adminOperatorManagement commands, admin GUI, help, and use of the starter item.
rxkoth.gui.adminOperatorAllows /koth gui and /koth edit, including editor actions.
rxkoth.helpOperatorAllows /koth and /koth help to open help.
rxkoth.help.textOperatorAllows /koth help text.
rxkoth.bypassOperatorSkips combat, AFK, and spectator capture restrictions. Dead players remain ineligible.
rxkoth.useEveryoneDeclared permission; it does not gate ordinary event participation.
rxkoth.guiFalseDeclared permission; use rxkoth.gui.admin for the command's GUI access check.

Help and text help are denied by default to ordinary players. Menu clicks and queued chat edits recheck permissions; transferred wands require admin access. Tab completion only suggests granted commands. Use effective permissions when testing. Operators usually have the bypass node, so their capture behavior may differ from ordinary players.

11 / REWARD THE WINNER

Rewards and management commands

These commands require rxkoth.admin. Replace arena with your event ID. Wand, region, GUI, spawn, and board-position commands require an in-game player.

/koth rewards add arena give %player% diamond 3
/koth rewards list arena
/koth rewards remove arena 1

/koth setspawn arena
/koth giveitem PlayerName arena
/koth delete arena

Reward commands run as console. Enter them without a leading slash. %player% becomes the winner's name and %koth% becomes the arena ID. Removal uses the one-based number shown by the list command. A starter item still requires admin permission to activate and is consumed after a successful start.

/koth stop arena uses the reward-winner stop path. Do not assume an administrative stop always suppresses rewards. Set up and test reward commands before running a public event.
12 / MULTI EVENTS

Add capture zones

Select a separate cuboid with /koth wand, then run:

/koth zones add arena alpha Alpha
/koth zones list arena
/koth zones remove arena alpha

Adding an extra zone switches the arena to Multi automatically. The main region remains capturable; up to four extra zones are supported. Each part tracks its own progress and holder. /koth multi is an alias for the same zone commands.

13 / EVENT TIMES

Daily and cron schedules

/koth scheduler daily arena evening 18:00 300 false
/koth scheduler add arena hourly 0 * * * * 300 false
/koth scheduler list arena
/koth scheduler remove arena evening

The first example runs daily at 18:00; the second runs on the hour. The optional stop value is seconds; 300 schedules a stop after five minutes. Cron uses five UNIX fields: minute, hour, day of month, month, and weekday.

Times use the Minecraft host's system timezone. Schedules are checked once per minute. Startup and plugin reload add a 90-second grace period, and missed runs are not replayed. random: true gives each matching run a 50% chance of being skipped; it does not choose a random arena or time.

14 / PLACEHOLDERAPI

Placeholder reference

Install PlaceholderAPI to use these values in compatible plugins. They read the first active event returned by RXKoth, rather than selecting an arena by ID.

PlaceholderValue
%rxkoth_active%true or false.
%rxkoth_name%Active event display name.
%rxkoth_mode%SCORE, CAPTURE, or MULTI.
%rxkoth_capturer%Current capturer name; None when no player holds it.
%rxkoth_time%Formatted remaining event time.
%rxkoth_points%Points for the player whose placeholder is being resolved.
%rxkoth_top_player%Top player for the active event.
%rxkoth_top_points%That player's event points.

Without an active event, active returns false and the other supported values are empty. These are event values, not all-time leaderboard queries.

Built-in visual templates use a separate set, including %koth%, %mode%, %capturer%, %time%, %points%, %viewer_points%, %capture_percent%, and Multi zone values shown in the default layout.

15 / FOR DEVELOPERS

API and events

Declare RXKOTH as a dependency in your plugin.yml and access the provider after RXKoth is enabled. Call Bukkit-facing event management methods on the server thread.

import com.rxkoth.rxkoth.api.RXKOTHApi;
import com.rxkoth.rxkoth.api.RXKOTHProvider;

RXKOTHApi api = RXKOTHProvider.get();
api.startKoth("arena");
api.getActiveKoth("arena").ifPresent(active -> {
    getLogger().info(active.definition().displayName());
});
api.stopKoth("arena", false); // Do not reward the winner.

The API also exposes getKoths() and getKoth(id). The provider throws if called before it is available.

Bukkit events are in com.rxkoth.rxkoth.api.event: KothStartEvent, KothStopEvent, and KothCaptureCompleteEvent. They expose the active event or arena, with player and zone information for captures. These events do not implement Cancellable.

WorldGuard and hologram plugin detection does not promise dedicated region-flag or third-party hologram API support. Optional Kingdoms display resolves a configured PlaceholderAPI expression; capture remains player-based.