I meant the concepts of it.
Okay, so, I want to get this out of the clear, I've never coded Bukkit pluggins. I've modded before and I know Java, but never developed a plugin. So, I've watched a good hour or so of youtube videos and I'm learning a lot and I've made a basic plugin. So here's how a VERY basic plugin will look. (All this plugin does is allow a player to type /sendme and it will say on the screen "Sent" in gold. I've added my own comments to help you guys understand. If you understand how everything works in this code, you're on a good track.)
--
package com.gmail.androidphoneeric.test;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.logging.Logger;
public class test extends JavaPlugin {
//Short hand for my plugin type
public static test plugin;
//Creates log which is type Logger. Logger allows you to interact with the server
public final Logger log=Logger.getLogger("Minecraft");
//What occurs when the plugin is enabled
public void onEnable(){
//Creates pdffile which is type PluginDescriptionFile that gets the description of this specific object
PluginDescriptionFile pdffile=this.getDescription();
//Prints out to console that the plugin has been enabled.
log.info(pdffile.getName()+"has been enabled!");
}
public void onDisable(){
//Creates pdffile which is type PluginDescriptionFile that gets the description of this specific object
PluginDescriptionFile pdffile=this.getDescription();
//Prints out to console that the plugin has been disabled.
log.info(pdffile.getName()+"has been disabled.");
}
//What occurs when a command has been called upon and what to do in such cases
//@sender: The sender of the command
//@cmd:
//commandLabel: What command they called
//args: Basic String args
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
//Casts the sender to a player object
Player player=(Player) sender;
//Check if this is the command they called
if(commandLabel.equalsIgnoreCase("sendme"))
{
player.sendMessage(ChatColor.GOLD+"sent");
return true;
}
return false;
}
}
------
Don't worry about knowing what the imports are and each one, and the comments should give you a run down of it all. But if you can read the code very well, you should be good for basic development!