Skip to content

Use vanilla whitelist as plugin failsafe#3

Merged
Xitee1 merged 1 commit into
masterfrom
feat/whitelist-failsafe
Apr 26, 2026
Merged

Use vanilla whitelist as plugin failsafe#3
Xitee1 merged 1 commit into
masterfrom
feat/whitelist-failsafe

Conversation

@Xitee1
Copy link
Copy Markdown
Owner

@Xitee1 Xitee1 commented Apr 26, 2026

Summary

  • Override PlayerLoginEvent.Result.KICK_WHITELIST in JoinQuitListener.onLogin so the plugin can let regular players in while it is active
  • Acts as a defense-in-depth safety net: if the plugin is disabled or fails to load, no event handler runs, the vanilla whitelist enforces, and only whitelisted admins can connect — preventing unregulated access while the plugin's TrustLevel/permission system is offline

Setup required

  • white-list=true in server.properties
  • Only admins (incl. server owner) added via /whitelist add

Test plan

  • Plugin enabled, whitelist on, non-whitelisted player → joins successfully
  • Plugin enabled, whitelist on, whitelisted admin → joins successfully
  • Plugin disabled, whitelist on, non-whitelisted player → kicked by vanilla whitelist
  • Plugin disabled, whitelist on, whitelisted admin → joins successfully
  • Banned player still kicked (KICK_BANNED) regardless of whitelist override
  • Player with DB load failure still kicked (KICK_OTHER) regardless of whitelist override

🤖 Generated with Claude Code

Override the vanilla whitelist on PlayerLoginEvent so regular players
can join while the plugin is active. If the plugin is disabled or
fails to load, the vanilla whitelist enforces and only whitelisted
admins can connect — preventing unregulated access while the plugin's
TrustLevel system is offline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Xitee1 Xitee1 merged commit c3a032e into master Apr 26, 2026
1 check passed
@Xitee1 Xitee1 deleted the feat/whitelist-failsafe branch April 26, 2026 17:28
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.

1 participant