Need help with NoSuchMethodException

Discussion in 'Plugin Development' started by hej, Jan 19, 2011.

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


    Hi, I'm trying to make a little plugin that will kick unwanted player.
    Basicly, when a player joins it will check in with my mysql database, compere some information and then decide if the player can join.

    Now, I haven't finnished any of that code since I'm stuck at getting the plugin to run at all.
    I guess I will just leave the console output and the main class here and see if anyone has got any ideas:

    The console output:
    2011-01-19 18:17:45 [INFO] Starting minecraft server version Beta 1.2_01
    2011-01-19 18:17:45 [INFO] Loading properties
    2011-01-19 18:17:45 [INFO] Starting Minecraft server on *:25565
    2011-01-19 18:17:45 [WARNING] The server will make no attempt to authenticate us
    ernames. Beware.
    2011-01-19 18:17:45 [WARNING] While this makes the game possible to play without
    internet access, it also opens up the ability for hackers to connect with any u
    sername they choose.
    2011-01-19 18:17:45 [WARNING] To change this, set "online-mode" to "true" in the
    server.settings file.
    2011-01-19 18:17:45 [INFO] Preparing level "world"
    2011-01-19 18:17:45 [INFO] Preparing start region
    Preparing spawn area: 20%
    Preparing spawn area: 44%
    Preparing spawn area: 61%
    Preparing spawn area: 93%
    2011-jan-19 18:17:49 org.bukkit.plugin.SimplePluginManager loadPlugins
    ALLVARLIG: Could not load plugins\LoginManager.jar in plugins: null
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(
            at net.minecraft.server.MinecraftServer.e(
            at net.minecraft.server.MinecraftServer.c(
            at net.minecraft.server.MinecraftServer.d(
    Caused by: java.lang.NoSuchMethodException: bukkit.Roliga.LoginManager.LoginMana
    ger.<init>(org.bukkit.plugin.PluginLoader, org.bukkit.Server, org.bukkit.plugin.
    PluginDescriptionFile,,, java.lang.ClassLoader)
            at java.lang.Class.getConstructor0(Unknown Source)
            at java.lang.Class.getConstructor(Unknown Source)
            ... 8 more
    2011-01-19 18:17:49 [INFO] Done! For help, type "help" or "?"
    And the main class:
    package bukkit.Roliga.LoginManager;
    import java.util.HashMap;
    import org.bukkit.entity.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.PluginManager;
    * LoginManager for Bukkit
    * @author Roliga
    public class LoginManager extends JavaPlugin {
        private final LoginManagerPlayerListener playerListener = new LoginManagerPlayerListener(this);
        private final LoginManagerBlockListener blockListener = new LoginManagerBlockListener(this);
        private final HashMap<Player, Boolean> debugees = new HashMap<Player, Boolean>();
        public LoginManager(PluginLoader pluginLoader, Server instance, PluginDescriptionFile desc, File plugin, ClassLoader cLoader) {
            super(pluginLoader, instance, desc, plugin, plugin, cLoader);
            // TODO: Place any custom initialisation code here
            // NOTE: Event registration should be done in onEnable not here as all events are unregistered when a plugin is disabled
        public void onEnable() {
            // Register our events
            PluginManager pm = getServer().getPluginManager();
            //pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Priority.Normal, this);
            // EXAMPLE: Custom code, here we just output some info so we can check all is well
            PluginDescriptionFile pdfFile = this.getDescription();
            System.out.println( pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
        public void onDisable() {
            // TODO: Place any custom disable code here
            // NOTE: All registered events are automatically unregistered when a plugin is disabled
            // EXAMPLE: Custom code, here we just output some info so we can check all is well
            System.out.println("Goodbye world!");
        public boolean isDebugging(final Player player) {
            if (debugees.containsKey(player)) {
                return debugees.get(player);
            } else {
                return false;
        public void setDebugging(final Player player, final boolean value) {
            debugees.put(player, value);
    Note: I commented out my event registation, same error with and without it.
  2. Offline


  3. Offline


    Now thats what i call a fast reply!
    Thank you, I got it up and running now! [​IMG]
Thread Status:
Not open for further replies.

Share This Page