Minecraft Blogs / Tutorial

Simple Bukkit Plugin codeing 1. OnEnable and Disable msgs [How to]

  • 812 views, 1 today
  • 1
  • 0
  • 1
j_boy1234's Avatar j_boy1234
Level 18 : Journeyman Nerd
25
Hey Guys so i've seen tutorials on how to setup your workspace but they don't have code so this is my tutorial on 
How to make a Bukkit Plugin Part 1. Enable and disable code
NOTE: This code works 1.7.10 if it changes i will  update this!!
My Main Class is called  "JavaPlugin1"

How to IMPORT: Hover over the word until a menu appears then hit Import 


1. After you get everything setup (Package, Class, Adding Bukkit to the Build path) you firstly need to add "Extends JavaPlugin" And IMPORT IT 
IMAGE: undefined

2. Now we need to send a message onEnable() and onDisable(), I Don't use logger personaly because i like colord chat in the console!! You can see the code in image IMPORT!! image: 
undefined

On the next blog i will show you how to make commands but first we need a plugin.yml

Ok because theres no commands this should be simple: 
How to make it: Right Click on your Project ---> new ---> file call it plugin.yml hit enter!
So paste this code in it:

name: Plugin name
main: me.PACKAGENAME.MAINCLASSNAME
version: 1.0


Questions, Comment!
Tags

Create an account or sign in to comment.

1
12/25/2014 9:55 am
Level 65 : High Grandmaster Programmer
fillpant
fillpant's Avatar
Good, but with bukkit you dont need the onEnable/disable messages, they are done by bukkit for you. Also its a good idea not to include numbers in classes (not affecting them but its a good practice) 
Also please underline in your tutorial that anyone willing to join bukkit coding comunity has to get a basic knowledge of java.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome