Welcome back to another Minecraft plugin development tutorial today I will be showing you how to send emails and how to hook your Minecraft plugin with your email Ulta responder I’m going to be giving you free and paid Solutions and all the source code will be available below after you have completed this Entire video because it’s only going to take me maybe 10 20 I hope not more than 30 minutes to explain even though some of these concepts are deep and very Advanced this thing can boost your network and 10x your network if you have some way to speak and engage your Players outside when they’re not playing you are tapping into a new dimension and you know I just don’t understand why so many startups so many starting networks don’t do this because this is honestly one of the easiest way to engage your players email you don’t have to have the The biggest difference between growing on email and growing on you know socials is that if you have a th000 players on email you have a very powerful email list if you have a th000 followers nobody even knows who you are right like the numbers the engagement is just Fundamentally different if you get 1,000 views on Tik Tok nobody even watches your videos it’s just incompatible so here we have Minecraft and basically what I’m going to show you is how to send HTML very goodlook emails directly from the game I should now receive an Email there we go it says welcome to mine Academy and it looks very legit it’s from my name and my you know registered email address at that provider and as you can see it is fully customizable the other thing is we can actually add people let’s say I’m just Going to be adding say banana and then banana Joe and we can add people to our autoresponder so this is the alt page let me reload that to see that excuse me this person has been added y there we go it says banana banana Joe okay there’s a Small mistake but we can fix that and the email has been added and there’s even a special tag which you can connect with automation so that when uh for example this is my project Orient trial automation when the tag is being added so when somebody comes with a tag added Through command you can automatically send them emails and hook them with your email ultimation this solution is not free however I would say it’s pretty affordable and at the end I’ll also discuss a couple of free options for email timation too so how do you actually send emails from Minecraft well It is very simple all you have to do is connect to an endpoint and just send them through an SMTP server and if that sounds too advanced don’t worry because there is a website who you know creates that SMTP server and lets you use their Java library to send HTML or Simple Text Emails for free it’s called send grid they literally give you the option to send up to 100 emails per day so all I ask you to do is you can start for free open an account go through the sign up procedure and then once you’re done I Believe that you can see the Java integration on the Cent grd usern interface but if you can’t just Google send grid Java and click the docs. send send grid link there we go so here you can see prerequisites so you know you should have the account and you should Just uh create the API key in the menu and then let me just scroll down installing Java yeah we already have that initializing your project Maven that’s right so what we can do we can just copy this thing implementation and place it into into our pom.xml file if You don’t know what that is please watch the first and the second video in this series as well as the video that has libraries in it if you just search for libraries you’ll find it so what I’m going to do I’m going to open up the P File and then at the very bottom I essentially just have to duplicate another dependency and then just edit the things inside now I’ve noticed that the version right here is a little bit outdated but I did find that they have the repository on the main Maven Central And we can see that the latest version is actually 4.10 so I can just copy that instead paste it right here and then hit the magic Maven reload changes button and you should be good to go now we also have to do the same for the plug-in that Yml and place the same in the libraries right here there we go the structure here looks like that and the structure here looks like this one except that the scope we can set it to provide it because uh this is hosted on the main Central repository that is supported by Spigot and paper so that we can download this Library when the plugin starts directly to the server without having to compile it with your jar great let’s go and let’s test it right so I’ve made a command right here I’m going to save you a whole bunch of time because I do have A video on how to create commands just a quick note always make sure to register your command in the UN enable main plug-in class like this as as well as your plugin. yml file like this one so this command basically requires me to place uh to type in at least SL command And then send or add so this example we’re going to be starting with sending of emails so what I simply do I simply get the player I verify that this is not a console and I simply get the first argument and if I type in slash email Send then this entire code fires and don’t worry I’ll explain everything line by line so first of all I wanted to make it very easy for you guys such that you can paste your email in the email folder inside your plugin so this is my plugin this is the email folder that I’ve Created and inside here I have a welcome email and this is very easy to create you can either type it by yourself or you can just Google free HTML email Builder and I came across with this stripo email Webb page I literally build this within just a Couple of minutes and then I hit export and then the file and then I hit HTML and I just paste this entire thing in here and as you can see that I use uh variables right here and I’ll show you how to parse them it is very very simple So basically what we have to do is the name of the file then we have to Simply locate the file inside our data folder that is the plug-in folder C Canon and then there is the email folder and then inside there is is supposed to be the Name of the email. HTML so this is how we locate the file now what if I type something that doesn’t exist say I want to have I have a typo right here it says no such email this is exactly what’s going on here no such email and then we Simply want to open up the email folder and then list the files and then we’re going to Simply list every file ending with HTML and then simply say which emails are stored in the plug-in folder I don’t have to really do this but I just wanted to give you guys extra value And really show you how to make userfriendly uh plugins and how to operate with files if you needed to rehearse that knowledge great and then I can just say sending email because this is going to take a while and then actually you know what actually this Entire block needs to be placed as a new bucket runable that’s right inside the Run body because this one actually needs to be run asynchronously because when we’re open opening a new sending request uh this is going to you know lock the server a Little bit so we need to run it off of the main thread so this is one change that I’m going to make and then basically how the API operates so we can just have a quick look at the official documentation and to be honest I just Copied this entire thing over and I just customized this so you’ll find a lot of these um you know basic things email subject content mail on the documentation right email is from then make sure this has to equal the verified sender on send grade which is my email Subject line I mean you can maybe just uh edit the file or maybe you can have like subject lines somewh or you know you just get creative how to load custom subject lines this is just a quick demo on how to do this I hardcoded it and Then the two is obviously the email that you want to send it to so I’m just sending to my own hello at m.org address and then we can actually use this trick to load Lo uh the content so in Java there is a class called files you can Call read onlines convert a file to a path and then open it for reading using the standard UTF 8 encoding which also supports emojis and it’s really cool so then we can simply um join all the lines cuz this is going to return a list right Every single line right here is going to be joined so line one 2 3 by this special letter great and then we can simply find and replace all the first name uren is with the c Current player’s name and then we have to make a new Content this is again class from sent GD uh the email class is also from sent grid by the way so just make a new content right here and the text/html needs to be HTML for HTML emails I think you can also do text it’s actually right Here so new content text plane and if you do this instead of putting the HTML you can actually something like this so you’ll see that you can directly type this which is pretty cool because maybe you can use books in Minecraft to send plain text email anyways this is not how to send Plain text I’m going to show you how to send very nice beautiful looking format it using HTML so this is how to do it and then we need to create a new male object uh that takes in the from subject to and content and then we have to Create a new API class I mean you can possibly just this just put this field outside of this Anonymous class because we don’t have to initialize it every time but you know this just a quick demo and then here you simply place the key I store the key in a separate email class And I hopefully don’t forget to delete it after this video and then you have to create a new request again using the com. send GD class careful with this because there is another class by the same name from a different package now this one should be pretty straightforward you can just copy this From the dogs and then call the API send grid this one is called SS I just don’t like the name I think it’s too short it sounds too German and uh the response right here is whatever we’re going to get so if the status code is 202 and This is something that is not on the Docks but you know I figure it out that means that the email was sent successfully however if it wasn’t you can simply return the body which typically means the error message and you can verify you can notify the player And of course you need to catch the entire thing and a try and catch block okay so that is supposed to be working great that’s the first thing now how to actually add your emails in a database well you know if you completely want to go for free you can just collect emails Make sure to ask for consent and you know study the difference between transactional emails and marketing emails before you get into any legal trouble and don’t send spam emails like I did I’m guilty of that mistake so that’s why I’m telling you U so you either just collect emails when player Register in your game and you place them in your own database and then you can send you know campaigns using sending Grid or any other free provider or you can store your emails in a CMR which simply holds a customer list and one of the best providers that I can recommend Is called active campaign let me actually pull this up active campaign starts at 29 a month but they ask you for monthly billing if you pay monthly it’s $40 a month so I understand that this is a little bit too pricey at least for you know if if you are just starting Out your network and I believe that MailChimp is completely for free if if you have only 500 people or less and then if you have say 1,500 it’s only 26 a month so it is considerably cheaper however I was not as happy as with active campaign I honestly just Recommend use active campaign maybe you can even reach out to them and ask for say 3 months you know 50% off uh as far as I know they would offer it too if you reach out personally I’m just going to show this through active campaign cuz their interface is extremely simple However if you decide to go with a completely free option mail chimp then they do have an API the same principles apply just Google their API and just like edit the calls a little bit if you get stuck maybe you can ask uh their support or ask chat GPT or ask Below in The comment section or simply look at their dogs and just customize the request the principles in this video are universally universally applicable no matter what provider you decide to use so what it is decided to do I wanted to implement this method for you guys cuz This is not exactly having to do with like email marketing this has to do with like opening or post requests to any website I’ve already had a method like this when it comes when it came to anti piracy video and I also want to save you A bunch of time you can find the source code if you go down you click the blog post link and inside my black post I link you with the source code to this so here we have it I created the ad contact contact method taking in the email first Name last name tax which is a feature of active campaign and then a list ID I’ll simply categorizes your contacts in different groups API action is going to be contact ad and by the way I posted a link to the specific example from which I learned and I forged this uh request In Java so if you are familiar with PHP a little bit they actually provide you a full code right here which you can just use on your on your website but if you want to use this inside Minecraft live then just use this example in Java so That’s one thing then the actual post request is going to contain a bunch of arguments I’m not going to spend so much time trying to explain them because they are explained in the API example right here if you look at the comments right here and then I guess this is just basic Java knowledge we’re just going to construct the query string so the active campaign Euro uh is going to look like for example act campaign API example and then these here are called query strings so you you can see that I’m using a helpware method called encode parameters From these two hashmaps and the helpware method is right here so basically this is going to just join uh API action just like that equals to contact ad and then it’s going to add um it’s going to add where is that this special character I don’t know the name in English to be Honest and then it’s going to Simply append it like this and another thing API output equals to Json so this is simply going to construct uh a string from this hashmap as well as from this hashmap cuz we need to post that into their API and it’s going to use the Active campaign API URL which again you will find if you have an account at active campaign at their developer documentation as well as you need an API key and then right here I simply push the post data and then I simply read the response just to see if everything is uh Correctly set up and you can see excuse me as you can see it says returned and then there’s a bunch of you know debug data but what we’re interested in is the return result message it says contact added that’s all that’s all that there is to it I’m happy that the contact was Added I don’t need the extra stuff great that’s pretty much it now how do we actually go ahead and use it well I’ve prepared an else if statement right here which simply reads if I type slail add and then basically the first thing is going to be the email the other thing is Going to be the first name and then I know why this bugged out in the game I also have to get rid of the second or actual the third argument I simply join uh the rest right this is useful if somebody has more than just One word name so if you are say John Amy doe right then John is the first name and active campaign is going to categorize Amy do as the last name cuz it does not really support middle names as far as I know great so that’s how you Extract this from the command and then you’re all going to do type in email Ule and then add contact email first name last name the tag is really whatever you wish to you can just say I don’t know command email command or whatever and The list ID is what do you find if you open up the navigation and then if you can’t see it you have to actually show navigation you go to lists and then you simply open up any list or you create a new list and and then in the Euro right Here it says list ID equals to 14 so this is what we need to use for example 14 right here and then once we’re done uh we can just actually get the response from the ad contact method and we can just tell the player the response that’s Right let’s go ahead Let’s test it out okie dokie guys now if I type in email send and I type something it’s going to give me the error if I type in sending email welcome it’s going to send s us a beautiful email and even translate the Player name to my username in Minecraft how crazy is that now if I want to add someone it’s going to give me help usage right here so if I want to add myself say Ma just like this one and I hit enter it’ll say result contact addit and Then if I reload this little email list that I have right here it will say ma test and then the name and then the tag and you can of course hook it up with automation you can add a new trigger when the tag uh email command is added And then you can obviously send the user the email so a couple of important extra things to remember when sending email number one there is a big difference between Promotional and transactional emails this is not a legal advice but the rule of thumb basically means any Sort of AD any sort of promotion or you know offering to buy something or you know new store sale discount these are classified as uh promotional emails they have to have the link to unsubscribe and people have to know that when they enter the email to your network that they are Opting in that’s the rule of Thum obviously this is not legal advice please refer to granular details the country are in and the country where you know players are coming from but this is the rule of them uh the other the other email type is transactional email this Means related to a specific transaction if if somebody purchases a rank for example then you may want to send them a confirmation email saying hey your transaction has been succeeded they don’t need to op in they don’t need to give you permission to send them this Email and there’s also no need to have an unsubscribe uh Link at the footer so just some things to keep in mind okay guys that sums up the entire video this is not about any marketing principles this is not about you know how to scale your network I just wanted to keep it Strict to coding cuz this is a Minecraft plugin development tutorial series but if you do want to know how to actually use these strategies responsibly and how to scale your network I invite you to join our training called project orian not only you’re going to learn all the Coding stuff that you need even if you’ve never coded before we’re going to give you an entire Java training for free there is also seven weeks of content regarding how to build mini games how to build custom systems such as custom enchantments GUI menu systems ranking statistics systems how to send Particles animations and a lot of good stuff just as this video has to show but we typically go two or three times as deep and the best of all twice a week I jump on a live coaching call where you can actually unmute yourself or you can Just chat and you can even share your screen and get your code reviewed live and best of all yes I even help you to scale your network talking about marketing how to get players how to understand their psychology a little bit and how to make them stay how to Incentivize them to stay how to motivate your players and stuff like that anyways I’ll leave the link to the course in the video description and if you don’t like it there’s a full 30-day money back guarantee from the day you start coding that can be up to 2 months later after You have you’ve enrolled with us that’s it for today if you appreciated me putting a lot of time into this video give it a nice thumbs up comment below that you enjoyed it and subscribe to this channel if if you haven’t already because I release really cool and Advanced videos every single week and you’re going to be learning a lot of very Advanced and cool stuff with me thank you so much and I’ll see you in the next Video Video Information
This video, titled ‘Ep52. Email Marketing In Minecraft?! (Full Guide)’, was uploaded by Matej on 2024-01-04 17:00:34. It has garnered 345 views and 10 likes. The duration of the video is 00:21:45 or 1305 seconds.
How to send email to your Minecraft players. I will show you how to send one-time emails (up to 100 per day for FREE) as well as how to launch automations based on player actions.
In this video, we’ll cover:
– Sending emails — How to send up to 100 free emails per day. – Automations — How to add tags to contacts based on player actions (i.e. command, join game, achieve X playtime) and run automations.
== COURSES == Minecraft Plugin Development: https://mineacademy.org/project-orion?st=yt&sc=tut_ep45 Forge Modding: https://mineacademy.org/forge-mastery?st=yt&sc=tut_ep45
== RESOURCES == Blog post: https://mineacademy.org/tutorial-45/?st=yt&sc=tut_ep45
Music: Electric Fields by tubebackr & Tetuano: https://freetouse.com/music
#coding #code #tutorial #money #developer #java #minecraft #minecraftplugin #bukkit #spigot #spigotmc #paper #paperspigot #programming