My Sign Plugin Is Not Working Please Help!

Discussion in 'Plugin Development' started by stantheman68, Jul 8, 2012.

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

    stantheman68

    Hey guys, I was making a freezing plugin but when I export it, it wont load because it says that there is some kind of error. Please Help here is the code for all the class's.

    Main Class
    Code:
    package me.stantheman68.bukkit;
     
    import java.util.logging.Logger;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class Bukkit extends JavaPlugin{
        public final Logger logger = Logger.getLogger("Minecraft");
        public static Bukkit plugin;
        public final BukkitListener bl = new BukkitListener(this);
       
        @Override
        public void onDisable() {
            this.logger.info("Disabled!");
        }
       
        @Override
        public void onEnable() {
            this.logger.info("Enabled!");
            PluginManager pm = this.getServer().getPluginManager();
            pm.registerEvents(bl, this);
        }
    }
    

    The Bukkit Listener Class:
    Code:
    package me.stantheman68.bukkit;
     
    import org.bukkit.ChatColor;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.block.SignChangeEvent;
     
    public class BukkitListener implements Listener {
     
        public static Bukkit plugin;
       
        public BukkitListener(Bukkit instance){
            plugin = instance;
        }
       
        @EventHandler
        public void onSignCreate(SignChangeEvent sign){
            Player player = sign.getPlayer();
            if(sign.getLine(0).equalsIgnoreCase("[Rules]")){
                player.sendMessage(ChatColor.AQUA + "-==RULES==-");
                player.sendMessage(ChatColor.GOLD + "1.Respect All Staff!");
                player.sendMessage(ChatColor.GOLD + "2.Do Not Spam!");
            }
        }
    }
    
    Console Message:
    Code:
    [SEVERE] Could not load 'plugins/SignRules.jar' in folder 'plugins'
    org.bukkit.plugin.invailedPluginDescriptionException: name is not defined
    PLEASE HELP!

    Someone Please relpy!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  2. Offline

    one4me

    Can you post your plugin.yml?
     
  3. Offline

    stantheman68

    Okay here it is
    Name: Bukkit
    main: me.stantheman68.bukkit.Bukkit
    version: 1.0
    description: >
    Sign Plugin
    commands:
     
  4. Offline

    EnvisionRed

    Er, the issue is that you're calling your plugin "Bukkit". Strange that you would do that anyway...
     
    McLuke500 likes this.
  5. Offline

    Darksonn

    The name of the tags in yaml i case senstive, change Name to name, oh and also, dont call your plugin Bukkit
     
Thread Status:
Not open for further replies.

Share This Page