Hello everyone! Today I will be explaining how to make a very simple, hello world Minecraft plugin!
***I MESSED UP THREE PARTS! PLEASE CHANGE THE FOLLOWING***
[spoiler]
1. Add extends JavaPlugin and import JavaPlugin.
2. Replace "Hello World!" with HelloWorld
3. Replace "p.getCustomName()" with "p.getName()"
[/spoiler]
Getting Started:
1. Head over to HERE and download Eclipse IDE for Java Developers. (This is what we will be using to program our plugins.)
2. Head over to HERE and hit download. This file is an extension to use Minecraft codes.
Time to Code:
1. Go to File > New > Java Project
2. For this tutorial, Name the project HelloWorld and select Next
3. Select Libraries > Add External JARs. This is where we import the craftbukkit libraries.
4. Find your file, Double click it to open and then hit Finish
5. Right click "src" > New > Package
6. Change the Name: to me.yourname.helloworld (You can replace yourname with whatever)
7. Right click on helloworld > New > Class
8. Change the Name to "Hello" and hit Finish
9. This is the code for the HelloWorld Plugin. Read the grey to understand. The lines represent the imports it leads to.
10. Right Click on HelloWorld > New > File
11. Name the File "plugin.yml" and then hit Finish
12. Double click plugin.yml and then enter the following: (Remember where it says yourname is whatever you put.)
13. Right click on the HelloWorld > Export
14. Select Java > JAR File > Next
15. Check the same boxes and then hit Next
16. Wherever you place your JAR file, move it into your Minecraft > Plugins folder and then start up your server!
17. If you copied correctly, you should see this in this console!
18. Once in-game, type /help to see that your plugin is there and /help helloworld to see the commands!
19. Now you are ready! Type in /hello and see your plugin in action!
Hello World Finished!:
That comes to the end of this tutorial! If you have any plugin tutorials then please let me know below!]
- I am currently working on Chat Channels.
***I MESSED UP THREE PARTS! PLEASE CHANGE THE FOLLOWING***
[spoiler]
1. Add extends JavaPlugin and import JavaPlugin.
2. Replace "Hello World!" with HelloWorld
3. Replace "p.getCustomName()" with "p.getName()"
[/spoiler]
Getting Started:
1. Head over to HERE and download Eclipse IDE for Java Developers. (This is what we will be using to program our plugins.)
2. Head over to HERE and hit download. This file is an extension to use Minecraft codes.
Time to Code:
1. Go to File > New > Java Project
2. For this tutorial, Name the project HelloWorld and select Next
3. Select Libraries > Add External JARs. This is where we import the craftbukkit libraries.
4. Find your file, Double click it to open and then hit Finish
5. Right click "src" > New > Package
6. Change the Name: to me.yourname.helloworld (You can replace yourname with whatever)
7. Right click on helloworld > New > Class
8. Change the Name to "Hello" and hit Finish
9. This is the code for the HelloWorld Plugin. Read the grey to understand. The lines represent the imports it leads to.
10. Right Click on HelloWorld > New > File
11. Name the File "plugin.yml" and then hit Finish
12. Double click plugin.yml and then enter the following: (Remember where it says yourname is whatever you put.)
13. Right click on the HelloWorld > Export
14. Select Java > JAR File > Next
15. Check the same boxes and then hit Next
16. Wherever you place your JAR file, move it into your Minecraft > Plugins folder and then start up your server!
17. If you copied correctly, you should see this in this console!
18. Once in-game, type /help to see that your plugin is there and /help helloworld to see the commands!
19. Now you are ready! Type in /hello and see your plugin in action!
Hello World Finished!:
That comes to the end of this tutorial! If you have any plugin tutorials then please let me know below!]
- I am currently working on Chat Channels.