Hello I would like a simple plugin with a command "/link {discord}" EXAMPLE: /link Oefen#8029 and it would link their IGN to their discord in a MYSQL database. TABLE NAME: discordlinking INFO: UUID,IGN,DISCORDTAG (Example: 28f25bcdc60b4ef59903506dc67a0fc4,Oefen,Oefen#8029) and if they do /link again with a different discord it just simply updates. This would be cool, Thanks! (Also CONFIG would be nice to change MYSQL details ofc) VERSION: 1.8.x
Could you tell me what you need to use this for? Depending on what the plugin is for, you will also need a way to verify a player's Discord account.
It’s for a Ranked SkyWars server. I’m a developer there, and I’ve made a discord bot with stats and stuff. Only thing is. I’m not that great at plugins. I just want an easy way for people to verify their discord to their ingame name so I can make sure if they do their discord tag shows up with the stats so people know who it is. This only requires me to search in the database for their UUID/IGN and grab their linked discord. It’s just more simple if people could link you know?
@NickGames8029 Considered having the plugin just post a link to a website? Like <yourwebsitehere>/register/<uuid of the player> Then handle everything on the site?
That seems like a lot more trouble and honestly I wouldn’t know how to do that. A plugin connected to a database is all I can think of that would work flawlessly. I’ve already tried looking up an plugin where you can store placeholders to databases but found nothing. If that was the case then I could easily make a custom placeholder for their discords and sent it to an database. EDIT: I just noticed what you mean. You mean like an API? We had that but it was removed by another developer because we changed skywars plugins. And this is sadly not an option anytime soon since everyone is quite busy.
With a plugin where they can do “/link {Example#0001}” and then it stores the discord with their uuid and ign in a database. And then i grab the info from the database.
That is not making sure that the right discord is linked to the right Minecraft account. (Verification)
It works out with the plugin though, and our community will not abuse it in any bad way. I don't see how it could be abused anyways. It's just so people can link their accounts, For me a simple plugin that sents data to a mysql database works out. I would be extremely happy if that's possible.
Hello, I have created a plugin for you to do this. Hope this helps Plugin Link: https://www.spigotmc.org/resources/discordlink.109764/
It was something I quickly threw together under the assumption that the OP would want all his players to link their discord therefore I just register the players UUID and Name into the Database upon joining but the DISCORD section of the DB is kept null for obvious reasons. If the OP would like this amended then I can do so as that's a literal copy/paste fix.
INSERT ON DUPLICATE KEY UPDATE Would use that one myself, with a primary key on the UUID so you don't get silly things. Also removes the need for the exists check in the onJoin.
Interesting I didn't think to use 'INSERT ON DUPLICATE KEY UPDATE'. And I tend to use Name as a primary key rather than the UUID because I had a bad experience with UUID's being the primary key in the past although it is probably better practice to use UUID's.