Example of a "plugin.yml"

Discussion in 'Bukkit Discussion' started by DarkScience, Jan 8, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    This is a strange question i assume but could someone give me an example of what this file should look like. I don't quite understand the syntax of this line.
    main: <packagename>.<PluginName>
    --- merged: Jan 9, 2011 4:11 AM ---
    Damn this is a pain in the ass. . . .
    I followed the instructions to create a plugin piece by piece but it just don't work what the heck. . . .
    --- merged: Jan 9, 2011 4:14 AM ---

    EDIT: Solved the issue not sure what i did wrong but i recreated the workspace in eclipse.
  2. Offline


    Here's what I use in my (not quite) ported IronDoorLock plugin:
    name: IronDoorLock
    main: com.AnonymousJohn.IronDoorLock.IronDoorLock
    version: 0.7
    Still have some hooks I need to work out for it before it's fully ported. >_<
    --- merged: Jan 9, 2011 7:40 AM ---
    name is whatever you want to call it, main is the Plugin class you want the PluginManager (or whatever) to use when attaching your plugin (in your plugin I think you'd use "com.bukkit.DarkScience.EnCraft_Bukkit.EnCraft_Bukkit" without quotes), and version is the version number. I believe name and version are either purely aesthetic (such as when something's trying to get the name of your plugin), or used by Bukkit itself to help check for necessary updates.
  3. Offline


    Thanks for the reply man, Trying to get use to this after using hey0.
    --- merged: Jan 9, 2011 8:06 AM ---
    Oh and also not sure about the file setup picture in first post, I keep getting errors.

    OK i redid my plygin based off of a open source plugin reference and well here's my code. Still don't work. . . .
    package com.bukkit.DarkScience.EnCraft_Bukkit;
    import java.io.File;
    import java.io.FileReader;
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import org.bukkit.Player;
    import org.bukkit.Server;
    import org.bukkit.event.Event.Priority;
    import org.bukkit.event.Event;
    import org.bukkit.plugin.PluginDescriptionFile;
    import org.bukkit.plugin.PluginLoader;
    import org.bukkit.plugin.java.JavaPlugin;
    import org.bukkit.plugin.PluginManager;
    import java.io.BufferedReader;
    public class EnCraft_Bukkit extends JavaPlugin {
        public static final Logger log = Logger.getLogger("Minecraft");
        public java.lang.String _N = "EnCraft_Bukkit";
        public java.lang.String _V = "0001";
        public EnCraft_Bukkit(PluginLoader pluginLoader, Server instance, PluginDescriptionFile desc, File plugin, ClassLoader cLoader) {
            super(pluginLoader, instance, desc, plugin, cLoader);
            log.info(_N + " v" + _V + " loaded!");
        public void onEnable() {
            // TODO: Place any custom enable code here including the registration of any events
            PluginDescriptionFile pdfFile = this.getDescription();
            System.out.println( pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
        public void onDisable() {
            System.out.println("Goodbye world!");
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jan 8, 2016
Thread Status:
Not open for further replies.

Share This Page