VelocityDiscord icon indicating copy to clipboard operation
VelocityDiscord copied to clipboard

[FEATURE] Whitelisting

Open LarrySteeze opened this issue 2 years ago • 6 comments

Is it possible to add a whitelisting feature, similar to what DiscordSRV uses for spigot based servers?

LarrySteeze avatar Apr 11 '23 14:04 LarrySteeze

I assume you're referencing this? https://docs.discordsrv.com/installation/link-to-join-setup/

This allows you to require the player have their discord account linked to their minecraft account before they can play on the server. When a player attempts to join, they get automatically kicked with a message saying that they need to message your DiscordSRV bot a code for them to be able to join.

I'd also be interested in such a feature :)

(I've actually been meaning to write my own "Discord-based whitelist" plugin for a while now - but have never gotten around to it...)

unilock avatar Apr 11 '23 17:04 unilock

I assume you're referencing this? https://docs.discordsrv.com/installation/link-to-join-setup/

This allows you to require the player have their discord account linked to their minecraft account before they can play on the server. When a player attempts to join, they get automatically kicked with a message saying that they need to message your DiscordSRV bot a code for them to be able to join.

I'd also be interested in such a feature :)

(I've actually been meaning to write my own "Discord-based whitelist" plugin for a while now - but have never gotten around to it...)

That's exactly what I mean!

LarrySteeze avatar Apr 11 '23 17:04 LarrySteeze

if i understand correctly this would require a database on the velocity server to hold whitelist?

fooooooooooooooo avatar Apr 14 '23 04:04 fooooooooooooooo

To implement it in a similar fashion to discordsrv, it would require the Plugin to have either it's own database or flatfile (imo dbs are safer) that stores a players uuid and their discord id, to link.

When a player connects, if linked and still present in the discord server, it allows them to stay connected. If not linked, it kicks the player and provides a reason with a randomly generated "link code" that they must dm the bot on discord. If linked but no longer present in the discord server, it kicks the player with a reason stating they must be in the discord server.

Hope that helps.

LarrySteeze avatar Apr 14 '23 11:04 LarrySteeze

@fooooooooooooooo I would very much like you to add this

wicivo avatar Dec 09 '23 12:12 wicivo

In the meantime, there's this, which I think is somewhat similar:
https://modrinth.com/plugin/discordauth

unilock avatar Dec 09 '23 13:12 unilock