Minecraft Plugins 4: StickFlying

Step 1
Step 2
This is what we are going to build:
Step 3
We are going to need a lot of imports for this plugin! Add these import lines to your plugin.java file.
Step 4
Let's start coding the plugin itself by adding the main class and the onEnable method.

Read the description next to each line of code and make sure you understand how it is working.

You will need to understand this to make your own custom items later!

Step 5
If this is all we included in the plugin, we could craft a "Broom Stick" but it wouldn't do anything special.

In the next step we will add special functionality to the "Broom Stick"

Step 6
These methods allow the player to fly with the Broom Stick and not take falling damage while holding it.
Step 7
Remember to save your files! Set up your "plugin.yml" file, compile your plugin and deploy it to your server.

Make sure you fix any compilation errors before trying to deploy.

Check Your Work
Step 8
Enter Minecraft and test out your plugin. You should be able to craft a "Broom Stick" and use it to fly!
Step 9
Use what you've learned to make your own custom items.

If you can make a plugin that creates this cake, the cake will have done its job!

Step 10
Enjoy the sweet taste of learning how to code!

This cake isn't a lie.

Step 11
In the next lesson we will learn how to make Custom Enchantments!

Try one of these lessons next:

Minecraft Plugins 4: StickFlying Info



Created By


Access Level


For Teachers and Schools

Teach coding to your students with MVCode Teach

MVCode offers an integrated product designed to teach coding to students.

Learn more about MVCode Teach