Skip to content
MCCitiesNetworkPublic

About

Network-wide support tickets for Paper servers

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Tickers

Tickers is a support-ticket plugin for Paper networks. A player runs /ticket, picks a category from a help menu and, if the menu's own answers do not help, joins one queue shared by every server. Staff take tickets from that queue on whichever server they happen to be on, and are moved to the player.

It is built for a network whose servers share one MariaDB database and one Redis, with no proxy plugin. It also runs on a single server.

Status

Released as 1.0.0 and running in production. Everything in REQUIREMENTS.md is built, covered by tests and checked on the live network, the six feature modules included. docs/verification/ lists the checks.

Requirements

  • Paper 26.3 or later
  • Java 25
  • MariaDB (tested against 11.7)
  • Redis (tested against 7.4)

Install

  1. Put the Tickers jar in the plugins folder of every server.
  2. Start each server once. Tickers writes its config files to plugins/Tickers/. If it cannot reach the database it says so in the log and disables itself.
  3. Fill in database.yml and network.yml (see below) and restart.
  4. Set accepts-transfers=true in each server's server.properties. Staff are moved between servers with transfer packets, and a server without this refuses them.

Tickers creates and upgrades its own tables.

Running on several servers

Every server gets the same database.yml and the same Redis in network.yml. In network.yml:

  • server-id is different on each server.
  • servers is the same on each server and lists all of them, with the host and port that players' clients connect to. A staff member's client is sent to the address listed there.
server-id: "survival"
redis-url: "redis://redis.internal:6379"
servers:
  lobby:
    host: "play.example.com"
    port: 25565
  survival:
    host: "play.example.com"
    port: 25566

The database is what tickets live in. Redis carries alerts between servers and records who is online where. If Redis goes down tickets keep working, but alerts reach only the server they happened on. After Redis comes back, Tickers waits a minute before it treats anyone as offline, so a restart does not put every ticket on hold.

If your Redis user is limited by an ACL, allow it to run INFO. A server that has just started asks Redis how long it has been up.

Config files

All in plugins/Tickers/. Tickers never rewrites a file you have edited. A current copy of each default is kept in defaults/, and the log names any keys an upgrade added that your file lacks.

File What it holds Reloads
database.yml The database url (no jdbc: prefix), username, password Restart
network.yml This server's id, Redis, and the list of servers Restart
settings.yml Cooldowns, description limits, auto-teleport, invulnerability, the new-ticket sound, reject reasons, how long a ticket stays on hold /ticket reload
help-menu.yml The menu players see: title, intro, buttons, categories /ticket reload
tiers.yml Staff tiers, lowest first, used for escalation /ticket reload
shop.yml Points earned per ticket and the rewards staff can buy /ticket reload
messages.yml Every line players and staff see, in MiniMessage /ticket reload

Commands

/ticket (or /tickets) with no arguments opens the help menu. /ticket help lists what the person running it may use.

Players

Command What it does
/ticket Opens the help menu
/ticket report Reports a player
/ticket status Shows your ticket's stage and your place in the queue
/ticket cancel Cancels your ticket while it is still waiting
/ticket stats Network-wide ticket counts

Staff: the queue

Command What it does
/ticket list Shows the queue
/ticket next Takes the next ticket
/ticket select <player> Takes that player's ticket
/ticket reject <player> Turns down a waiting ticket, with a reason
/ticket remove <player> Removes every ticket a player has

Staff: the ticket you are handling

Command What it does
/ticket info Shows the ticket
/ticket tp Takes you to its owner, on another server if need be
/ticket fly Toggles flight
/ticket close Finishes it as resolved
/ticket drop Finishes it as dropped
/ticket transfer <staff> Hands it to another staff member
/ticket escalate Passes it up to the next tier
/ticket join <player>, /ticket leave Helps on someone else's ticket, and stops
/ticket return Goes back to where you were before a ticket moved you

Staff: everything else

Command What it does
/ticket duty off <time>, on, list Stops and starts you being offered tickets
/ticket suspend, /ticket resume Pauses your own waiting ticket
/ticket stats [name], top, history Who finished what
/ticket transcript <id> [page] The saved chat of a ticket (needs the chat module)
/ticket shop, /ticket points The rewards shop and your balance
/ticket mentor Sets who mentors whom; a mentor may join their mentee's tickets
/ticket reset <staff> Sets a staff member's counts back to zero
/ticket reload Reloads the config files marked above, and the modules that support it

Permissions

Each command has its own node, tickers.command.<name>: tickers.command.next, tickers.command.close and so on. Two groups bundle them:

Node Default Gives
tickers.player.* everyone Opening, reporting, cancelling, status, stats
tickers.staff.* op Being staff, and every staff command
tickers.staff op Being staff: getting alerts and being offered tickets

A few nodes are not commands of their own: tickers.command.join.any (join any ticket without being its handler's mentor), tickers.command.duty.others, tickers.command.stats.others, and tickers.command.points.others, .log and .adjust. Every node is listed with a description in paper-plugin.yml.

Feature modules

Integrations with other plugins are separate jars. Put the ones you want in plugins/Tickers/modules/. A module whose plugin is missing logs one line and does nothing.

Module Needs What it does
webhooks nothing Posts ticket events to Discord webhooks, with JSON templates you can edit
chat CarbonChat A private chat channel per ticket, saved as its transcript
notifications PlayerNotifications 1.5+ Tells staff who are not in game, through the channels they chose
placeholders PlaceholderAPI %tickers_waiting%, %tickers_my_total%, %tickers_top_1_name% and others
namebook Namebook Looks player names up through Namebook before Tickers' own records
fireworks packetevents A firework only the staff member sees when their ticket is resolved

A module's config, where it has one, is plugins/Tickers/modules/<name>/config.yml.

The notifications module needs one manual step. PlayerNotifications reads default channels only from its own delivery-defaults.yml, so on each start the module writes a ready-made snippet to plugins/Tickers/modules/notifications/defaults/delivery-defaults.yml. Copy its entries into plugins/PlayerNotifications/delivery-defaults.yml and reload that plugin.

Using the API

Other plugins can listen for Tickers' events and read tickets through TicketsApi. The api is published to the network's Maven repository:

repositories {
    maven("https://maven.minecraftcitiesnetwork.com/releases")
}

dependencies {
    compileOnly("com.minecraftcitiesnetwork:tickers-api:1.0.0")
}

TicketsApi is registered with Bukkit's services manager: getServer().getServicesManager().load(TicketsApi.class). The events are ordinary Bukkit events. Declare Tickers in your paper-plugin.yml under dependencies.server, with load: BEFORE and join-classpath: true.

Build

./gradlew build

Docker must be running: the database and Redis tests start real MariaDB and Redis containers, and fail without it.

The plugin jar is paper/build/libs/tickers-paper-<version>.jar. Each module is modules/<name>/build/libs/tickers-<name>-<version>.jar. Ignore the -unshaded jars beside them.

./gradlew :paper:runServer starts a Paper test server in paper/run with every module installed. CLAUDE.md describes how to run two of them against one database for the multi-server checks.

Other documents

About

Network-wide support tickets for Paper servers

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages