Solved No plugins working, at all?

Discussion in 'Plugin Development' started by Samthelord1, Jan 11, 2014.

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

    Samthelord1

    All of the plugins that I have recently been testing have not worked, first when i tried I thought, oh, it must not be working, so i coded a simple plugin... here is the source,
    HTML:
    /*
    * To change this license header, choose License Headers in Project Properties.
    * To change this template file, choose Tools | Templates
    * and open the template in the editor.
    */
    package me.samthelord1.nohunger;
     
    import org.bukkit.event.Listener;
    import org.bukkit.event.entity.FoodLevelChangeEvent;
    import org.bukkit.plugin.java.JavaPlugin;
     
    /**
    *
    * @author Sam
    */
    public class main extends JavaPlugin implements Listener{
        public void onEnable() {
            getServer().getPluginManager().registerEvents(this, this);
                 
        }
        public void noHunger(FoodLevelChangeEvent e) {
            e.setCancelled(true);
        }
    }
    
    and the plugin.yml
    HTML:
    name: NoHunger
    main: me.samthelord1.nohunger.main
    version: 1.0.0
    author: samthelord1
    
     
  2. Offline

    HyrulesLegend

    Samthelord1
    Off-topic, you forgot the @EventHandler in your sig. ^_^
     
  3. Offline

    xTrollxDudex

    Samthelord1
    You also forgot
    in your code
     
    HyrulesLegend likes this.
  4. Offline

    Samthelord1

Thread Status:
Not open for further replies.

Share This Page