Skip to content

Xyness/XAnnounce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

XAnnounce

Announcements & automatic messages addon for XCore — cycling BossBar, Title, ActionBar, Chat and Scheduled messages, a tab-list and scoreboards, reusable display conditions, text animations, and fully customizable join / first-join / quit messages with conditional variants.

Features

Auto-Message Types

  • BossBar — cycling titles with color, style, progressive animation (fill/drain), per-entry display time, optional time-range
  • Title — main title + subtitle with configurable fade-in / display time / fade-out per entry
  • ActionBar — cycling messages with configurable display duration per entry
  • Chat — cycling messages with MiniMessage formatting (including click/hover events)
  • Scheduled — messages that fire once per day at a specific real-world time (HH:mm); supports chat, title and actionbar

TabList & Scoreboards

  • Live tab-list — one header/footer refreshed continuously; any PlaceholderAPI placeholder works
  • Live scoreboards — define multiple sidebars; for each player the first one whose condition (and permission/worlds) matches is shown (config order = priority)
  • Packet-based (FastBoard) — works on Folia
  • Anti-flicker — optimized scoreboard with anti-flickering system
  • Conditional lines — a line that resolves to an empty string is hidden, so %xannounce_condition_<name>% makes a line appear/disappear on its own
  • Up to 15 lines per scoreboard; configurable global refresh rate (display.refresh-ticks)

Display Conditions

  • Define named conditions under conditions: once, then reference them everywhere with condition: <name>
  • Each condition combines its sub-conditions with AND or OR
  • Operators: = == != >= <= > < contains !contains (numeric when both sides are numbers, otherwise case-insensitive text)
  • Usable as a value too: %xannounce_condition_<name>% prints the condition's yes / no output
  • Gates auto-messages, scoreboards, tab-list, individual scoreboard lines, and join/quit variants

Animations

  • Define animated text under animations: (a list of frames + an interval in ms)
  • Insert %animation:<name>% in any text — tab-list, scoreboard, bossbar, title, chat, join/quit…
  • Frames may themselves contain placeholders; the current frame is derived from the wall clock (every player sees the same frame at the same moment)

Join / Quit Messages (conditional variants)

  • Custom join, first-join and quit broadcasts (replace or hide the vanilla messages)
  • Multiple conditional variants per group under variants: — the first variant whose condition passes is used (e.g. a different join message for VIPs); a variant with no condition is the fallback. Omit variants: for a single message.
  • first-join fires the very first time a player connects (falls back to join when no first-join variant matches)
  • On join, additionally give the player: a sound, a title/subtitle, an action bar, a temporary boss bar, and a private chat message
  • Each effect is independently toggleable; quit uses the broadcast only
  • %player% works without PlaceholderAPI; PAPI, built-ins and animations are also supported

Conditional / Targeted Display (on every message type)

  • condition — show only when a named condition (or an inline expression like %player_level% >= 10) passes. Legacy alias: placeholder-condition.
  • permission — restrict to players with a permission (e.g. VIP-only announcements)
  • worlds — restrict to specific worlds
  • disabled-worlds — hide in specific worlds; a per-message list overrides the global disabled-worlds for that message (full per-message control)
  • time-range (bossbars) — only display during a window, e.g. 20:00-06:00 (supports cross-midnight)

Per-Player Toggles

  • Players toggle each type with /xannounce toggle <type> (bossbars, titles, actionbars, chats, tablists, sidebars)
  • Preferences are stored in XCore's database and persist (per-server, or shared via cross-server sync)
  • BossBars are dynamically loaded/unloaded when toggled

Weighted Random Selection

  • Any cycling group can use mode: random instead of sequential cycling
  • Optional weights list for weighted probability (e.g. [3, 1, 1] makes the first message 3× more likely)

PlaceholderAPI Expansion

  • %xannounce_bossbar_enabled% / %xannounce_title_enabled% / %xannounce_actionbar_enabled% / %xannounce_chat_enabled% — the player's toggle states
  • %xannounce_condition_<name>% — the named condition's yes / no output for the player

Web Dashboard (XCore Web Panel)

  • Full config editor — a "Config" page that loads, validates and saves the entire config.yml, then reloads the addon. Invalid YAML is rejected before anything is written, so a syntax error can never break the live config.
  • GET /api/xannounce/config/raw — raw config.yml text · POST — validate + write + reload
  • GET /api/xannounce/messages — list configured messages · GET /api/xannounce/status — counts, scheduler state, PAPI, display stats
  • GET /api/xannounce/player/<name> — a player's toggles · POST /api/xannounce/player/toggle
  • POST /api/xannounce/reload — reload · POST /api/xannounce/toggle — enable/disable a configured message

Performance

  • Single async refresh clock drives the tab-list + scoreboards; all per-player work runs on the player's own region thread (Folia-safe)
  • Static lines/titles/header/footer are resolved and parsed once and shared — PlaceholderAPI and MiniMessage only run for lines that actually change
  • Pre-joined tab-list text, pre-compiled patterns, and allocation-free condition evaluation keep the hot path light

Folia Compatible

  • Uses XCore's SchedulerAdapter throughout; player-specific work (titles, action bars, bossbars, placeholder resolution) runs on the player's region thread
  • Packet-based scoreboards instead of the Folia-incompatible Bukkit Scoreboard API

Commands

Command Description Permission
/xannounce Show plugin version (alias /xan) None
/xannounce reload Reload the full configuration (config, conditions, animations, tab-list, scoreboards, join/quit) and restart schedulers xannounce.admin
/xannounce test <name> Preview a configured message on yourself xannounce.admin
/xannounce toggle bossbars Toggle BossBar messages None
/xannounce toggle titles Toggle Title messages None
/xannounce toggle actionbars Toggle ActionBar messages None
/xannounce toggle chats Toggle Chat messages None
/xannounce toggle tablists Toggle the tab-list None
/xannounce toggle sidebars Toggle the scoreboard None

Configuration

The config.yml is organized top-to-bottom as: general → conditions → animations → display → tablist → scoreboards → auto-messages → join-quit.

Top-level sections

  • conditions — reusable named display conditions
  • animations — named animated text fragments (%animation:<name>%)
  • display.refresh-ticks — how often the tab-list / scoreboards refresh
  • tablist — the live tab-list header/footer
  • scoreboards — one or more live, condition-selected sidebars
  • disabled-worlds — global default for worlds where auto-messages are disabled (each section can override)
  • auto-messages.bossbars / .titles / .actionbars / .chats / .scheduled
  • join-quit.join / .first-join / .quit — with optional variants:

Optional fields (all auto-message types)

  • condition — named condition or inline expression (alias: placeholder-condition)
  • permission — only show to players with this permission
  • worlds — restrict to specific worlds
  • disabled-worlds — hide in these worlds (overrides the global list)
  • modesequential (default) or random
  • weights — weighted random probabilities (only with mode: random)
  • time-range (bossbars) — only display during a time window (e.g. 20:00-06:00)

Frequency format

15s (seconds), 5m (minutes), 1h (hours), 1d (days) — combinable, e.g. 1m30s.

BossBar colors

BLUE, GREEN, PINK, PURPLE, RED, WHITE, YELLOW

BossBar styles

SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20, SOLID

Dependencies

  • Required: XCore
  • Optional: PlaceholderAPI (for placeholder support in messages, conditions and animations)

About

All-in-one server announcements & live displays, fully MiniMessage & PlaceholderAPI driven.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors