How to Make a Minecraft Sever Plugin

27,086

19

15

Introduction: How to Make a Minecraft Sever Plugin

In this instructable I will show you how to make a Minecraft Plugin!

Step 1: Eclipse

Got to www.eclipse.org/downloads/  and download Eclipse IDE for Java EE Developers. Make sure you get the version for your computer in the upper right corner! Click which processor you have 32 or 64bit. After you click that link it should say thank you for downloading.

Step 2: Getting Setup

Once it's done downloading open Eclipse. It should automatically make a folder called workspace so you can use that or create a folder. After that click x on the welcome window in eclipse and you should get a screen like this. Click file new project then Java Project. Click next and name it whatever you want but, no spaces! Next go to dl.bukkit.org to download the newest version of craftbukkit. After that in eclipse double click on your java project folder. Then right click on the folder and click build path add external Archives. Then choose the craftbukkit you just downloaded. 

Step 3: Building the Program

Right click(control click) the src folder in your java project folder. New>Package and name it what you named the java project folder it has to be exactly right otherwise it gets too confusing! Then right click on the package you just made New>Class and name it the same as your package and Java Project then click finish. Next you should get a screen with the name if your plugin and some other stuff. On the public class line  edit to say public class (the plugin's name) extends JavaPlugin {            After that you should get an error click on the Lightbulb and click import JavaPlugin (org.bukkit.plugin.java).  Your going to be importing a lot of bukkit stuff so make sure you have the craftbukkit. Hit return in between the curly brackets type @Override hit return again. Type public void onEnable (){ hit return and type Logger.getLogger("Minecraft").info("This Plugin is Running!");  Then go out of that curly bracket into blank space between the two. Then hit tab.

Step 4: The Confusing Part.

After you hit tab type in @Override hit return and type public void onDisable (){        Hit return there should be some blank space. Next get out of that Ondisable line and hit return. Type in the blank space between the curly brackets public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){       And then hit return. That whole line should be red/wrong hit return. Next in the blank space in between the two new brackets type   if(cmd.getName().equalsIgnoreCase("ignite")){       Hit return then type Player s = (Player)sender;   Hit return type Player s = (Player)sender;    Hit return type Player target = s.getServer().getPlayer(args[0]);   (Sorry if this is confusing)   Make Sure to import the files from bukkit like .getName and s.getServer and .get player   .       Hit return and type target.setFireTicks(10000);  Make sure to import .getFireTicks   .  Hit return and type return true;    .
   Look at the last photo for this step it is the completed Program and then go between the top bracket on the bottom and the 2nd to top on the bottom once again look at the picture. 

Step 5: Almost Done!!!!

Right click on the Java Project/Folder New>File. Then name that file plugin.yml and open it (open it in text edit for mac). Type name:  (whatever your plugin is called)    hit return type (here's a confusing part) main: name.name (put your Name of the the Package and class which should be the same where name is) hit return. Type description: (your description of that plugin) . Hit return type  version: 1.0 Hit return and type author: (your username)  . Then hit return twice and type commands:   Hit return then hit the space bar once and type ignite:  (leave this blank) . Hit return for the last time and the space bar twice and type description: (this description will show up in minecraft). 

Step 6: Finishing Up!

Make sure you save plugin.yml and then right click the folder/java project and hit refresh (if you don't it won't work). After you save your project right click on the java project/folder and hit export. Then name the plugin and put it into your plugins folder and you're done!! If you have any questions leave a comment!

Be the First to Share

    Recommendations

    • Toys & Games Contest

      Toys & Games Contest
    • Furniture Contest

      Furniture Contest
    • Big vs Small Challenge

      Big vs Small Challenge

    15 Comments

    0
    TomOlsen
    TomOlsen

    Question 1 year ago on Step 3

    I downloaded and built spigot- 1.15..2.jar, then got to the point where it says "you get an error, click on the light bulb" I don't have a light bulb. and If I right click on the error it does not give the option to import. javaplugin

    Eclipse for Win64
    Version: 2020-03 (4.15.0)
    Build id: 20200313-1211

    0
    robertlugg
    robertlugg

    Tip 1 year ago on Step 1

    If you aren't sure 32 or 64, the 32 bit version works on both.

    0
    digipup1
    digipup1

    7 years ago

    Yes, you are free to do whatever you want.

    0
    War_Hunter_Killer
    War_Hunter_Killer

    Reply 4 years ago

    How do you do it on minecraft pe

    0
    Mahmouda251
    Mahmouda251

    Reply 3 years ago

    you can't make MC plugins without a computer..

    0
    digipup1
    digipup1

    4 years ago

    No @chloemm @NovaGaminkills

    0
    WCKD_Newt
    WCKD_Newt

    4 years ago

    Well You guys you have to put the Plugin u made and put it into the Folder Plugins Put it in the Folders guys

    BTW--JOIN ARE SERVER WEB.GOLDE.ORG

    0
    Powerbots
    Powerbots

    5 years ago

    I want to make a sever

    0
    Bobey
    Bobey

    7 years ago

    So after you do all that you can get on mc and make your world

    0
    wilwhipkey22
    wilwhipkey22

    Reply 5 years ago

    will it work on a world that you have already made and is it compatible to PC minecraft

    0
    chloemm
    chloemm

    5 years ago

    Wait, so is this a server?

    0
    chloemm
    chloemm

    5 years ago

    Wait, so is this a server?

    0
    NovaGaminKills
    NovaGaminKills

    5 years ago

    Will this work for a mcpe server?