Skip to content

Conversation

@IxPrumxI
Copy link
Member

No description provided.

Copy link
Member

@Vankka Vankka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ban sync tie-breakers are though, I think a "prefer true" might be the most appropriate default for it (so if MC or Discord is banned = ban, if both unbanned = unbanned)

public boolean preferDiscordTieBreakerOnFirstJoin = true;

@Comment("When a player links their account, prefer the Discord side for tie-breaking")
public boolean preferDiscordTieBreakerOnAccountLink = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should already be possible to configure via ban-sync.tie-breakers.link (or along those lines)

@Vankka
Copy link
Member

Vankka commented Dec 19, 2025

I don't think there are exploits in the player connected handler itself:

  • DiscordSRV should by know whenever a user links -> causes resync using tie-breaker logic
  • DiscordSRV also knows whenever a Discord user is banned -> syncs directly to Minecraft
    • Unless the server is offline -> then up-to tie-breaker logic upon reysnc

The tie-breaker itself can be a exploit of sorts, if bidirectional sync is needed. For this I think we should implement SyncSides (should be renamed: TieBreaker) for PREFER_TRUE (and PREFER_FALSE)

"First join" resync being different doesn't really make sense to me, as players link status can be linked OR unlinked on their first login: on multi-server networks and when using the global linking service, it also relies on the world data (on Bukkit, at least), so it might not even be the player's first time ever joining the server.
So to me it just feels like a inconsistency more than a useful feature. I didn't write this task on the board, but maybe @Dinty1 can give input if I've missed something

@Dinty1
Copy link
Member

Dinty1 commented Jan 25, 2026

As far as I remember, ban-sync.tie-breakers.link wasn't a thing when I added that to the board. Thinking about it now it didn't make a whole pile of sense anyway as the exploit would require the user to somehow link their account while banned from discord.

And of course anything which happened while the server was offline has to be handled by tiebreaker logic. Setting the default tiebreaker to Discord may have been the best way of avoiding this if we had a way of properly detecting in game bans but we don't so 🤷‍♂️

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.

3 participants