Skip to content

Revert Velocity console MiniPlaceholders special case - #847

Open
jpenilla wants to merge 1 commit into
trunkfrom
revert-velocity-console-miniplaceholders-special-case
Open

Revert Velocity console MiniPlaceholders special case#847
jpenilla wants to merge 1 commit into
trunkfrom
revert-velocity-console-miniplaceholders-special-case

Conversation

@jpenilla

@jpenilla jpenilla commented Aug 2, 2026

Copy link
Copy Markdown
Member

This reverts the Velocity portion of #758. It does not revert the unrelated Paper run-task change included in that PR.

For a player message rendered to console, the sender is the player who sent the message and the recipient is console. With relational MiniPlaceholders enabled, Carbon passes:

(console, player)

MiniPlaceholders v3 treats the first audience as the principal audience. Normal audience placeholders therefore resolve for console. Player-only placeholders such as <player_current_server> cannot resolve, and LuckPerms cannot find a user for the console identity.

#758 replaces the console recipient with sourced.sender(). sourced.sender() is the player, not console, so it instead passes:

(player, player)

This is why the change appeared to work: normal audience placeholders once again receive a player. However, it only works by discarding the actual recipient. Relational placeholders are also evaluated as the player's relationship with themselves.

How we got here

Before MiniPlaceholders v3, Carbon could provide normal audience placeholders for the sender separately from relational placeholders for the recipient and sender.

The intended roles were established through several earlier fixes:

#690 then updated Carbon for MiniPlaceholders v3. In v3, placeholder resolvers receive their audience from the MiniMessage parsing context. Relational placeholders require a RelationalAudience, whose first audience is also the principal used by normal audience placeholders.

This means Carbon can no longer simultaneously provide:

normal audience placeholders -> sender
relational placeholders      -> recipient, sender

in one parse without additional parsing or format complexity. Passing (recipient, sender) for relational placeholders necessarily makes normal audience placeholders use the recipient too.

91f00da3 introduced the relational-placeholders config option and disabled it by default for this reason. 5ee2f950 then made the parsing audience follow that option.

This intentionally provides two modes:

relational-placeholders Behavior
false Normal audience placeholders resolve for the sender. This matches user expectations for almost all common chat formats.
true Carbon follows MiniPlaceholders' relational model using (recipient, sender). Normal audience placeholders consequently resolve for the recipient, and formats may need to select the sender explicitly.

#732 was filed against beta.36, before these two modes existed, so relational parsing was unavoidable in the latest release and the original report was reasonable. By the time #758 was merged, the config solution above was already on trunk; affected users should instead have been directed to the appropriate mode or format adjustment described below. #758 bypassed that solution by introducing a third, Velocity-console-only behavior.

Resolution for users affected by #732

For formats like the one reported in #732, leave relational-placeholders disabled. If relational placeholders are actually needed, keep the option enabled and explicitly select the sender where necessary. For example, using the Expressions Provider:

<expr_player:<username>:<player_current_server>>

or:

<expr_player:<username>:<luckperms_prefix>>

Carbon's render_for tag is another option where appropriate, with the existing caveats around preprocess tags and nested MiniMessage parsing.

This revert removes the third, console-specific behavior and restores the same configured semantics for every Velocity recipient.

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