[Help] Plugin not loading?

Discussion in 'Plugin Development' started by nbkburns, Mar 11, 2014.

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

    nbkburns

    I've done everything right i just dont understand!

    plugin.yml
    Code:
    name: bank
    main: me.infamousburns.bukkit.bank
    version: 0.1
    description: Bank
    bank.java
    Code:
    package me.infamousburns.bukkit;
     
    import org.bukkit.Bukkit;
    import org.bukkit.Material;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.block.Action;
    import org.bukkit.event.player.PlayerInteractEvent;
    import org.bukkit.inventory.Inventory;
     
    public class bank {
     
        public void onEnable(){
            Bukkit.getServer().getLogger().info("Bank enabled");
            }
       
            public void onDisable() {
                Bukkit.getServer().getLogger().info("Bank disabled");
            }
       
            public static Inventory Bank = Bukkit.createInventory(null, 27, "Bank");
           
            @EventHandler
            public void blockChestInterract(PlayerInteractEvent event) {
                if (!event.isCancelled()){
                    if(event.getAction() == Action.RIGHT_CLICK_BLOCK) {
                        if(event.getClickedBlock().getType().equals(Material.CHEST)){
                            event.setCancelled(true);
                            event.getPlayer().openInventory(Bank);
                      } 
                    }
                }
            }
    }
    Error log
    Code:
    [16:57:39] [Server thread/INFO]: Starting minecraft server version 1.7.2
    [16:57:39] [Server thread/INFO]: Loading properties
    [16:57:39] [Server thread/INFO]: Default game type: SURVIVAL
    [16:57:39] [Server thread/INFO]: Generating keypair
    [16:57:40] [Server thread/INFO]: Starting Minecraft server on *:25565
    [16:57:40] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-1.7.2-R0.3-b3020jnks (MC: 1.7.2) (Implementing API version 1.7.2-R0.3)
    [16:57:40] [Server thread/ERROR]: Could not load 'plugins\bank.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: main class `me.infamousburns.bukkit.bank' does not extend JavaPlugin
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:49) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:313) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:236) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.java:350) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.craftbukkit.v1_7_R1.CraftServer.<init>(CraftServer.java:312) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.PlayerList.<init>(PlayerList.java:63) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.java:126) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:424) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    Caused by: java.lang.ClassCastException: class me.infamousburns.bukkit.bank
        at java.lang.Class.asSubclass(Unknown Source) ~[?:1.7.0_51]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:47) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        ... 10 more
    [16:57:40] [Server thread/INFO]: Preparing level "world"
    [16:57:40] [Server thread/INFO]: Preparing start region for level 0 (Seed: 6079249136944386697)
    [16:57:40] [Thread-7/INFO]: ----- Bukkit Auto Updater -----
    [16:57:40] [Thread-7/INFO]: It appears that you're running a Beta Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds.
    [16:57:40] [Thread-7/INFO]: If you would like to be kept informed about new Beta Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'beta'.
    [16:57:40] [Thread-7/INFO]: With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes.
    [16:57:40] [Thread-7/INFO]: If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml.
    [16:57:40] [Thread-7/INFO]: ----- ------------------- -----
    [16:57:41] [Server thread/INFO]: Preparing start region for level 1 (Seed: 6079249136944386697)
    [16:57:42] [Server thread/INFO]: Preparing start region for level 2 (Seed: 6079249136944386697)
    
    Please help :)
     
  2. Offline

    Syd

    nbkburns
    main class `me.infamousburns.bukkit.bank' does not extend JavaPlugin
     
  3. Offline

    UntuchedForce

    This should be placed under "Plugin Development" :) Maybe you would get better help there!
     
  4. Offline

    TnT

    Moved to the correct forum.

    UntuchedForce
    Please just report the post. Notifying someone that they posted in the wrong forum only encourages them to repost the same thread in the correct forum, causing duplicate posts. We are happy to move the thread to the correct section when reported.
     
Thread Status:
Not open for further replies.

Share This Page