Skip to content

AddstarMC/BatterGList

Repository files navigation

BetterGList

A first-party AddstarMC Velocity plugin that replaces the proxy's built-in /glist.

Why

Velocity's built-in /glist is weak:

  • In-game it only shows a player count; you must type /glist all for the per-server list.
  • On console (which we use heavily) it renders a broken, unparsed placeholder, e.g. <arg:0> players are currently connected to the proxy.

BetterGList always shows the full per-server list and a correct total, in both console and in-game.

What it does

  • glist (console) / /glist (in-game) prints the full per-server player list and a correct total.
  • Accepts an optional all argument for backward-compat — output is identical with or without it.
  • Servers listed alphabetically, players alphabetically within each server, and empty servers are never shown.
  • Each name is prefixed with the player's LuckPerms suffix (we use suffix for name colour), rendered as MiniMessage.
  • Vanished players (PremiumVanish) are marked with a coloured [V] tag (hover: "Vanished").
  • Counts reflect only the players shown — computed from the filtered set, never proxy.getPlayerCount().

Permissions

Node Effect
betterglist.use Run the command and see output. Treated as staff-only in v1.

The console always works regardless of permission (Velocity's console reports true for every permission). Players without betterglist.use see the command as non-existent / non-runnable.

Reserved for a future public-facing version (not implemented yet): betterglist.see-hidden-servers and betterglist.see-vanished — see Visibility model.

Dependencies

Both are optional soft dependencies — the plugin loads and works without either, degrading gracefully:

  • LuckPerms (LuckPerms-Velocity) — provides player suffixes. Absent ⇒ names show without a suffix.
  • PremiumVanish — provides vanish state for the [V] marker. Absent ⇒ no [V] markers.

The startup log reports whether each hook resolved, so a missing hook is obvious during testing.

Visibility model (v1 vs future)

The command is admin-only in v1 and shows everything (all servers, all players, including vanished — those are marked, not hidden). Two independent visibility dimensions are already modelled in the VisibilityFilter seam so that opening the command to regular players later is config-only, not a refactor:

  • Server-level (isServerVisible) — hide staff/secret servers from normal players.
  • Player-level (isPlayerVisible) — hide vanished players regardless of server.

v1 ships ShowAllFilter (pass-through). A future version supplies a real filter (configurable hidden-server set + PremiumVanish via VanishProvider, gated by the reserved permissions above). GListCommand already computes counts from the post-filter set, so no command changes are needed.

Build

./gradlew build

Targets Java 21 (the Velocity proxy runs on 21) and the latest Velocity API. No tests; a successful build is the bar. Output jar lands in build/libs/.

Notes

  • Overriding the built-in /glist: on init the plugin unregisters any existing glist command, then registers its own (alias betterglist). This guarantees BetterGList handles /glist even though Velocity registers the built-in Brigadier command at startup.

About

A better /glist command for Velocity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages