promotional bannermobile promotional banner
premium banner
Provide lightweight custom title and timing functions for fabric servers

Description

 

This is a lightweight titles and playtime tracking mod, addressing the pain point of not being able to use title and timing plugins on modded servers! Only needs to be installed on the server side. Currently only supports 1.20.1 Fabric. Supports customizing titles for players via commands, including colored text and Chinese characters. Integrates seamlessly into the TAB list, with titles and playtime tracking not conflicting with each other.

Here's the usage tutorial:

1) Setting Display Position:

/time position <after|above|below>

  • after: Displays on the same line after the player's name (Recommended; also works in TAB).

  • above / below: Uses invisible armor stands to display a second line above/below the player's name.

/time afkTimeout <seconds>

  • Sets the AFK detection timeout in seconds (default 60). Timers pause after 60 seconds of no "voluntary actions".

/time monthBy30Days <true|false>

  • Whether to use 30 days = 1 month for progression (default true).

/time show <true|false>

  • Global toggle for displaying online playtime (default true).

Examples of "Voluntary Actions": Camera movement, using/placing/attacking blocks, item interaction, dropping items, hotbar slot switching, inventory clicks, etc.
Not Counted: Chat messages, commands, passive movement (e.g., water flow, pushing).


2) Titles (Syntax consistent with before)

/chtitle set <player> <title...>

  • Sets the title displayed as <title>, applied as a team prefix (visible in chat, above head, and TAB).

  • If the player has a saved color/palette, it is used; otherwise, the defaultColor is applied.

/chtitle color <player> <color name ...>

  • One color name → solid color; Multiple color names → cycles colors per character (not gradient).

  • Supported separators: Chinese/English commas, spaces (including full-width), plus signs (+/+).

  • Color names can be in Chinese/English/aliases; Direct hex (#RRGGBB), 0xRRGGBB, or decimal values are also supported.

/chtitle clear <player>

  • Clears the title (only clears the prefix, does not affect the online playtime suffix).

/chtitle reload-config

  • Reloads config/ch-mod.json (does not clear player title/color data).

Permissions: Default requires OP level ≥ 3 (configurable via requiredOpLevel in config/ch-mod.json).
<player> supports player names and selectors resolving to a single target (e.g., @s, nearest @p), not multiple targets (e.g., @a).


Display Rules (Key points to avoid conflicts)

Within the same team:

  • Prefix = Title <...> (with colors/cycling).

  • Suffix = Online playtime (auto-converts minutes → hours → days → months).

Because both prefix and suffix belong to the same team, the player's name in the TAB list displays both the title and playtime simultaneously without overriding each other.

above/below display only on the nameplate's second line and do not affect TAB.


Configuration & Data Files

Generated automatically on first run. Use /chtitle reload-config or restart after manual edits (only ch-mod.json requires reloading).

Configuration Files:

  • config/ch-mod.json (Main config, JSON)

    • requiredOpLevel (int) – Required OP level for /chtitle commands (default 3).

    • useScoreboard (bool) – Whether to enable team prefix (default true, generally keep enabled).

    • defaultColor (int) – Default color if no saved color exists (decimal, default white 16777215).

    • namedColors (map<string,int>) – Color name mappings, extensible with Chinese/English/aliases.

      • Built-in examples: 红/紅, 金, 橙, 黄/黃, 绿/綠, 青, 蓝/藍, 紫, 白, 灰/grey, 黑, 粉; red, gold, orange, yellow, green, aqua, blue, purple, white, gray, black, pink.

  • config/ch-mod-time.json (Playtime display/logic; runs with defaults if not found)

    • position"after"|"above"|"below" (default "after").

    • afkTimeout: AFK timeout in seconds (default 60).

    • monthBy30Days: Whether 30 days = 1 month (default true).

    • show: Whether to display playtime (default true).

    • strongRefreshSeconds: TAB "boosted refresh" duration after joining/changing title/unit progression (default 5).

All these playtime settings can also be modified dynamically using /time ... (saved and applied immediately).

Hope all server owners find it satisfactory~ (I'm a server owner myself too).