assigning permissions on join based on CSV file?
hello! i have a list of emails and an associated value that will determine a permission that will be given to newly joining members of my server.
they first verify their email online, and then their email is linked to them via a SQL db.
i need a way to check the CSV after email verification and run a command based on its outputs. it sounds like it would have to be a plugin, but i dont know how to write one.
any insight from developers? thanl you in advance!
17 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by risograph#0
It sounds like you're trying to grant permissions based on the user's status on something like Patreon. You'd be better off using the Minecraft Authentication mod/plugin than having the user manually verify their email when they join.
https://minecraftauth.me/
I made a companion Spigot plugin that allows you to grant roles based on the information Minecraft Authentication provides. If you're not running Spit/Paper, then you should be able to use the API calls I have in my plugin as an example for getting the information you need.
https://modrinth.com/plugin/minecraftauthenticationroles
Minecraft Authentication
Link your Minecraft account to other services
Modrinth
MinecraftAuthenticationRoles - Minecraft Plugin
A simple plugin that allows server owners to grant permissions using LuckPerms based on a users minecraftauth.me information.
lol thats my post
this is basically step 2
oh shoot
am blind
shoot
mb
all good!
is 1am here ðŸ˜
so ill clarify at this point:
i am running a school minecraft server, and i have a list of everyone's emails and their year of grad. each player can already link their email to their account, what i have to figure out now is how to assign them a permission that matches their year of grad for cosmetic reasons
basically:
where name is unimportant
Ah, yeah, that's out of scope for Minecraft Authentication.
You might be able to do this with Skript, but I don't have any direct advice on that.
It seems like you'd be dependent on being able to trigger the permissions event after they've used whatever method of email verification you landed on. It seems like it'd be a really easy plugin to make tbh.
I'm assuming that if they haven't verified their email online then they can't join the server, in which case all the plugin would have to do is this
1. When the player joins, check if the uuid exists in the SQL DB, if not then kick them.
2. If they do exist, check the year and format it into a luckperms group name
3. Check if the user has that group, if not then add it.
okay got it, i premptively joined the skript discord server because i knew it would have to be something like that.
thank you for the guidance!
This sounds interesting, are you planning on uploading a CSV file manually to the plugin/skript’s directory regularly or will the same SQL DB be used to check?
so they are actually different, which is part of the problem
i figured it out at 12 am! just learned skript for this
in short:
i was struggling to figure out how to write
{{_email}::year}
at the bottom, too tired to read about variable nesting
!solvedpost closed!
The post/thread has been closed!
Requested by risograph#0