Do you want to make your own custom minecraft plugins well in this series we’re going to be covering just that now before we start it is very important that you already know the basics of java programming if you don’t then no worries i have a complete java course that you Can watch for free by starting a free trial on skillshare a link to that can be found in the description and in the pinned comment now assuming you already know java let’s get started by making our very first plugin now to make our project a lot easier to Use we can install an intellij plugin called minecraft development a link to this can be found in the description if you want to install it from this website or you can simply install it through intellij itself to do this we can go to our plugins tab right here and make sure You’re selected on marketplace and then do a search for minecraft you want to find minecraft development right here and then click on install and then we have to restart intellij so go ahead and click on restart ide now afterwards we can create a new project and then from here we see minecraft on The left go ahead and click on that and then click on spigot plugin click on next and then enter in all the information you want here now for the group id and artifact id you can enter whatever you want i’m going to name mine worn off keys tutorial for both of them And then afterwards i can click on next now from here you can configure your main class name i’m going to keep mine like this but of course you can change this if you want you can also change your plugin name and the minecraft version for this series we’re going to Be using 1.18 and then you can add in whatever extra information you want in here such as a description your name your website and other information like that so fill out anything you want here and then click on next and then now we can select the exact path we want for Our project to live so i’m going to go ahead and select my getting started folder and then from here i can click on finish now our plugin is ready to go the only thing we need to do now is to set up a basic local server so if you already Have a server setup then go ahead and use the youtube player to skip to the next section so if you go to getspigit.org or you just google get spigot you should find this website here where you can download version 1.18.1 i’m going to download this exact version because that’s the version that the Intellij plugin created our plugin for so i can go ahead and click on download right here and then i can click on spigot 1.18.1 right here make sure you don’t click on these ads they’re not necessary of course and then here we have our jar so Now i’ve made a new folder called server and i put the jar file which we just downloaded into that folder now we need a way to actually run this and the easiest way within a windows computer is to go ahead and click on the path and Then type in cmd and press enter and this will open up our terminal now if you’re on mac or linux then go ahead and do a quick google search on how to open up the console for those operating systems but once you have the console open no matter which operating system You’re on you want to create a file which is going to make it much easier for us to actually run our server so within our folder here i’m going to make a new text file and i’m going to call this start.bat now if you’re on mac or linux you want To name this start.sh instead so it would look like this but i’m on windows so i’m going to use start.bat we can right click on this and click on edit or open this in whatever text document you want and now you want to type in the following code this will be in the Description so you can easily copy and paste it so i’m going to type java space jar space spigot dash 1.18.1.jar which is the exact file name for our spigot jar right here so if you renamed yours make sure you have the correct name for your file inside this text file right here Then afterwards space no gui which is one word so we can go ahead and save and close this and now within our terminal i can say start.bat or if you have start.sh of course you would say start.sh instead now here we see a bunch of gibberish happening in our console Here it’s going to go ahead and create a server for us and then no matter which operating system you’re on it will immediately close and we do have to agree to the end user license agreement here so go ahead and open up eula.txt and change euler equals false to eula equals true and Then save and close that file afterwards we can go back to our console and just simply press the up arrow to go back to start.bat or start.sh and then press enter to run it again now the process of setting up the server might take a few seconds depending on Your pc specs so i’m going to go ahead and pause the recording until it’s done for me so here we see that it is done it took 58 seconds for me and now we can type pl or plugins and we see that there are zero plugins as expected of course if we Go into our plugins folder we see no draw files in here now i’m wanting to set it up where whenever we go to start our server it will automatically take our project and move it into our server plugins folder one thing we don’t want to do is to continuously copy and paste things Manually because that takes a lot of time and we also never want to run the reload command the reason for that is something we’ll be explaining later on in the series so what i want to do is i want to modify the start.bat or the start.sh command in order to move our Plugin file into our plugins folder so i’m going to right click on my start file and i’m going to edit it i’m then going to go into intellij and we’re going to set up this project to actually be built so if i go to build build artifacts this is actually grayed out so I need to click on the gear near the top right and then go to project structure from here i can go to artifacts and then i can click on the plus sign i can then select jar and then jar with modules from dependencies now normally we would Select our main class here but in this case we don’t have one because the spigot library handles the main class for us so just simply click on ok and then here we have getting started compile output is automatically going to be put inside of the jar but there’s one More thing we have to do so go ahead and click on apply and okay and now within the resources folder we have our plugin.yml within here we see some information such as the name the project version our main file path and we need to actually include this Inside of our jar file so let’s go back to the gear and then go to project structure and then under artifacts we want to click on the plus and then select file we could then go into our project go into the source go into main and then go into resources and we should Have our plug-in yml file right there so again that is your main project source main resources and then plugin.yml once you click on it press ok and now we see that both the plugin yml and the compile output will be stored inside of the jar so it can actually be Used from here click on apply and then okay and now we can go to build build artifacts and simply just press enter and this will actually build this plugin here we see a new out folder if i expand this we see artifacts getting started and then getting started.jar now Right now our plugin doesn’t do anything so i want to make sure that i’m printing something to the console within spigots we can do this with bucket dot get logger dot info and then print out hello world and then i also want to print out using bucket dot get logger dot info Shutting down so now we’re going to see hello world or shutting down whenever a plugin is starting up or shutting down that way we know it’s actually working and of course if we want to change the jar file we can go back to our project structure and then change the name right Here for example i can call this one off keys tutorial and then i also want to right click on gettingstarter.jar right here and then click on rename and i’m going to call this warnoff keys tutorial now if i press enter and then apply and okay i can now rebuild the project and we Then should see a one-off case tutorial jar within our artifacts folder as we see right here so i’m going to go ahead and get rid of getting started and now within here i want to make sure that this jar is moved into our server’s plugins folder every Single time we start up our server so to do that i’m going to right click here and then i’m going to click on copy path slash reference and then i’m going to select absolute path right here so we have now copied the path or the exact directory where This jar is located so going back into our start.bat or start.sh file we can now try copying this into our plugins folder now for windows the command will be copy but if you’re on mac or linux the command is just going to be cp so if you’re on those operating systems Just use cp instead of copy but i’m on windows so i’m going to type out copy i could then add in a space and two quotes and within this i’m going to paste in the exact path to the jar file which we just copied from intellij then after This ending quote we want to add in a space two more quotes and then dot forward slash plugins which will reference a folder called plugins in the same exact directory as our start file so here we have our start file and then here we have our plugins folder so basically Before we actually start our server with this line here we’re wanting to copy our plugin into our plugins folder and then start the server so go ahead and save this now if you still have a server running you can type in stop to stop the server and then from There we can just simply run the script again so start.bat or start.sh and here we see one files copied now if i go into the plugins folder we now see one off keysetorial.jar and now we see that our server is going to actually be starting up now we see done and directly above That we see the text hello world and this is from our own plugin if i type in pl and now we see one plugin on our server which is one off case tutorial now if i type in stop we should see a shutting down message so i’m going to Say that right here and here we see it shutting down so now our server is up and running and everything’s working correctly and whenever we go to compiler plug-in we can now restart our server to get the most up-to-date changes so now that all this setup is done in future Videos in this playlist which will be linked down below we can actually start making our own custom minecraft plugins and testing them in game Video Information
This video, titled ‘Introduction to Minecraft Plugin Development (2022)’, was uploaded by Worn Off Keys on 2022-04-05 14:59:48. It has garnered 79286 views and 1476 likes. The duration of the video is 00:10:11 or 611 seconds.
The perfect place to start learning Minecraft plugin development. 🧠 Free Java course ➡ https://wornoffkeys.com/java-for-free
🔥 Updated video on how to deploy your plugin: https://youtu.be/XslTgP6Fgz4
🙋♂️ Need help? Ask in our Discord community: https://wornoffkeys.com/discord
📺 Watch more Discord.JS videos here: https://wornoffkeys.com/playlist/spigot
💡 Have an idea for a video or course? Request it here: https://wornoffkeys.com/content-request
——————————
🕒 Timestamps: 00:00 How to make Minecraft Java plugins 00:24 IntelliJ Minecraft Project Setup 01:47 Setting up a local Spigot server 04:41 Auto moving our plugin to our server
#minecraft #spigot #wornoffkeys
FTC Legal Disclaimer – Some links found in my video descriptions might be affiliate links, meaning I will make commission on sales you make through my link. This is at no extra cost to you and it helps support the channel so I can make more free YouTube videos.