Skip to content

player-counter: add Minecraft Proxy (Velocity/BungeeCord/Waterfall) query type - #163

Open
Martindob wants to merge 5 commits into
pelican:mainfrom
Martindob:feature/player-counter-velocity-proxy
Open

Martindob wants to merge 5 commits into
pelican:mainfrom
Martindob:feature/player-counter-velocity-proxy

Conversation

@Martindob

Copy link
Copy Markdown

Summary

Adds a Minecraft (Proxy) query type so player-counter can query Velocity, BungeeCord and Waterfall proxies.

Details

  • New MinecraftProxyQueryTypeSchema (minecraft_proxy), reusing MinecraftJavaQueryTypeSchema's ping/status logic but skipping the legacy enable-query attempt entirely — a live test against Velocity showed that attempt throwing an uncaught exception instead of falling back to ping cleanly.
  • PlayersPage: added isProxy; avatar, whitelist, OP, kick and ban are all hidden for this type, since a proxy has no whitelist/ops/player files and stock Velocity/BungeeCord/Waterfall don't provide kick/ban commands out of the box.
  • PlayerCounterSeeder: eggs named/tagged Velocity/BungeeCord/Waterfall are auto-assigned minecraft_proxy. Proxy mappings are checked before the generic minecraft tag mapping, and an existing wrong minecraft_java association on such an egg gets corrected.
  • README documents the new type.

Testing

  • php -l on all changed files.
  • Manually tested against a live Velocity proxy on a Pelican panel.

…uery type

Velocity, BungeeCord and Waterfall all speak the same Java Edition
status/ping protocol as a vanilla server, so the existing Java query
schema can be reused as-is for a proxy target. Adds a distinct
"Minecraft (Proxy)" query type so it shows up separately in the game
query type selector, and disables the whitelist, OP list and avatar
features on the players page for this type since a proxy has no
whitelist.json/ops.json or player data files of its own.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SA9aNschKoWLmWkWNC2fGZ
…tempt

Velocity/BungeeCord/Waterfall don't reliably support the legacy
enable-query/query-port GameSpot query protocol, and the exception
thrown by the query library on failure was propagating past the
generic Exception catch in MinecraftJavaQueryTypeSchema::tryQuery(),
crashing the players widget instead of falling back to ping.

Override process() in MinecraftProxyQueryTypeSchema to always use the
ping/status protocol only, skipping the legacy query attempt entirely
for proxy targets.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SA9aNschKoWLmWkWNC2fGZ
Matches eggs named/tagged Velocity, BungeeCord or Waterfall to the new
minecraft_proxy query type, same as the existing minecraft/bedrock/source
tag mappings, so proxy eggs get a sensible default query type without
manual admin setup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SA9aNschKoWLmWkWNC2fGZ
… tag

An egg tagged both 'minecraft' and a proxy tag (e.g. 'velocity') hit
the generic 'minecraft' -> minecraft_java mapping first in the old
MAPPINGS order. Since EggGameQuery::firstOrCreate() only matched on
egg_id, the association created by that first match was never revisited
once a later proxy mapping matched the same egg, so the egg kept
minecraft_java instead of minecraft_proxy.

Move the proxy mappings before the generic 'minecraft' one, and
resolve a single highest-priority mapping per egg explicitly instead
of relying on iteration order plus firstOrCreate's create-only
semantics. Also correct the one known bad state this ordering bug
could already have produced on an existing install: a proxy egg whose
association still points to minecraft_java gets updated to
minecraft_proxy. Any other existing association (including a manually
customized one) is left untouched, so re-running the seeder can't
clobber intentional admin changes to unrelated eggs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SA9aNschKoWLmWkWNC2fGZ
Both actions were only gated on the active tab, not on isProxy, so
they showed up on the online tab for a minecraft_proxy query too and
sent 'kick <name>'/'ban <name>' to the proxy's console. Stock Velocity,
BungeeCord and Waterfall don't provide those commands out of the box,
so the actions couldn't do anything on a proxy unless a plugin added
them. Gate both on !isProxy, same as the whitelist/OP/avatar features.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SA9aNschKoWLmWkWNC2fGZ
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 20791ef5-7049-49a5-839f-68593315c347

📥 Commits

Reviewing files that changed from the base of the PR and between 9610734 and 92b3f22.

📒 Files selected for processing (5)
  • player-counter/README.md
  • player-counter/database/Seeders/PlayerCounterSeeder.php
  • player-counter/src/Extensions/Query/Schemas/MinecraftProxyQueryTypeSchema.php
  • player-counter/src/Filament/Server/Pages/PlayersPage.php
  • player-counter/src/Providers/PlayerCounterPluginProvider.php

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants