Unable to load plugin. abnormal plugin type

Discussion in 'Plugin Development' started by 99storm2, Apr 16, 2014.

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

    99storm2

    Hey i cant find an answer to this on any previous posts. Does anyone know what is causing this error?

    Error:

    Code:
    [20:54:19 ERROR]: Could not load 'plugins/Gamble.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: Abnormal plugin type
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:56) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:127) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:328) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugins(CraftServer.java:350) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.reload(CraftServer.java:784) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at org.bukkit.Bukkit.reload(Bukkit.java:288) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:696) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerConnection.java:953) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:815) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:148) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
    Caused by: java.lang.InstantiationException: me.storm2.drink.main
        at java.lang.Class.newInstance0(Class.java:342) ~[?:1.6.0_65]
        at java.lang.Class.newInstance(Class.java:310) ~[?:1.6.0_65]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:52) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-21-g1ab090e-b3050jnks]
        ... 20 more
    
    Main:

    Code:
    package me.storm2.drink;
     
    import org.bukkit.ChatColor;
    import org.bukkit.Material;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class main extends JavaPlugin implements Runnable{
       
        private Player p;
        private int slot;
       
        public main(Player p,int slot) {
            this.p = p;
            this.slot = slot;
           
     
            }
       
       
        @Override
        public void onEnable() {
            this.getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "$Let the cash flow because gamble is now online!$");
        }
        @Override
        public void onDisable() {
            this.getServer().getConsoleSender().sendMessage(ChatColor.RED + "Oh no! The cash flow has stopped! Gamble is now offline D:");
        }
     
        @Override
        public void run() {
            if (p.getInventory().getHeldItemSlot() == slot && p.getItemInHand().getType().equals(Material.GLASS_BOTTLE)) {
                p.sendMessage("Sup bro");
        }
    }
     
    }
    
     
  2. Offline

    SnipsRevival

    Get rid of the constructor for your main class.
     
  3. Offline

    KingFaris11

    1. Why would your plugin implement Runnable...?
    2. Why does your main class have a constructor.
    3. Why does your constructor require a Player and a slot... what are you trying to do?
     
  4. Offline

    99storm2

    SnipsRevival Thanks

    @kingfaris I was reading another post on here and following what he was saying im guessing by your questions i probably shouldnt be learning from him
     
Thread Status:
Not open for further replies.

Share This Page