Skip to content

Extend NotifyLogin with configurable join and quit messages - #108

Merged
remdui merged 3 commits into
mainfrom
agent/extend-notifylogin-messages
Aug 5, 2026
Merged

Extend NotifyLogin with configurable join and quit messages#108
remdui merged 3 commits into
mainfrom
agent/extend-notifylogin-messages

Conversation

@remdui

@remdui remdui commented Aug 5, 2026

Copy link
Copy Markdown
Member

What changed

  • fully replace Paper join and quit messages whenever NotifyLogin is enabled
  • add default messages for every player, ordered permission overrides, and UUID/name player overrides
  • preserve per-event inheritance while treating an explicit empty string ("") as suppression
  • ship only the requested Supreme+ permission override and an empty player_overrides section by default
  • use the exact requested MiniMessage defaults, including Supreme+ spacing, and move Supreme+ localization to notifylogin.group.supremeplus.*
  • migrate customized legacy notifylogin.supremeplus values without overwriting customized destinations, including language-specific values
  • resolve PlaceholderAPI against the joining/leaving subject while retaining recipient-specific localization
  • validate malformed configuration safely and isolate rendering/delivery failures per recipient

Vanish and privacy correctness

  • suppress persisted/currently vanished staff join and quit messages
  • use Vanish's single canonical persisted-state read and complete readiness only after the state is applied
  • fence readiness by connection generation so rapid reconnects, disconnects and explicit state changes cannot leak stale announcements
  • fail closed on missing state, scheduling failures, lookup failures and timeouts
  • evaluate quit state before Vanish clears its runtime state
  • add announce_vanish_state_changes: true to NotifyLogin configuration
  • entering vanish applies the resolved quit message before Bukkit visibility is removed
  • leaving vanish restores Bukkit visibility first and then applies the resolved join message
  • use the same UUID/name/permission/default resolution for real and synthetic connection messages
  • cancel a pending public join when the player enters vanish, preventing a false leave for somebody who was never announced
  • keep persisted vanish restoration and feature reload restoration silent to avoid misleading duplicate leave messages
  • disabling announce_vanish_state_changes suppresses only synthetic messages while privacy state tracking remains active

Configuration impact

Existing enabled configuration remains valid. Missing generated sections and the new vanish transition option are added automatically. Use "" to suppress a configured join or quit message.

enabled: false
announce_vanish_state_changes: true

default:
  join: notifylogin.default.join
  quit: notifylogin.default.quit

The old notifylogin.supremeplus localization key is removed after migration; a customized value is preserved as the new Supreme+ join value when the destination is still untouched.

Validation

Validated on head 35cec99, built directly on current main (1b8015c):

  • Checkstyle: passed
  • Maven verify and all unit tests: passed
  • JaCoCo/test report publication: passed
  • bundled Paper platform acceptance: passed
  • branch is 0 commits behind main and mergeable
  • no unresolved review threads

Regression coverage includes:

  • UUID/name/permission/default precedence
  • missing-field inheritance and explicit suppression
  • malformed values and invalid priorities
  • exact generated configuration and message defaults
  • localization-key migration behavior
  • Vanish connection fencing, disconnect cancellation and stale completion rejection
  • default-enabled, disabled and malformed vanish-transition configuration
  • entering/leaving vanish announcement decisions, pending joins and duplicate-state suppression

@remdui
remdui marked this pull request as ready for review August 5, 2026 09:48
@remdui
remdui force-pushed the agent/extend-notifylogin-messages branch from 0c39953 to bb5f620 Compare August 5, 2026 13:27
@remdui
remdui force-pushed the agent/extend-notifylogin-messages branch from c697cb1 to 35cec99 Compare August 5, 2026 16:23
@remdui
remdui merged commit ccec3d1 into main Aug 5, 2026
7 checks passed
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