Problem with custom plugins with BukkitForge

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
H

HydroTekZ

Guest
I am trying to add a custom plugin, but it somehow refuse to load properly. I have tried both BukkitForge and MCPC+, neither works. When I try to only import BukkitForge (not bukkit/craftbukkit), I am getting this error:
7d106a00b1aa8a5f1de51c459392b3d8.png

And when I import bukkit/craftbukkit I am getting the error down below. I have tried to only use BukkitForge and Ebean as build path jars, didn't help a bit. I can also say that I have tried multiple versions of BukkitForge and MCPC+. Btw, MCPC+ couldn't load any plugins (same type of error as below), but BukkitForge failed only to load my custom plugin. Does anyone have an idea how I can fix this?

Error:
Code:
2016-01-02 04:55:23 [SEVERE] [BukkitForge] Could not load '.\plugins\Spillere.no.jar' in folder '.\plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.ClassNotFoundException: Failed to remap class no.spillere.plugin.ftb.FtbPlugin
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:176)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:307)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:232)
        at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugins(CraftServer.java:816)
        at org.bukkit.craftbukkit.v1_5_R3.CraftServer.<init>(CraftServer.java:219)
        at keepcalm.mods.bukkit.asm.BukkitStarter.run(BukkitStarter.java:47)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Failed to remap class no.spillere.plugin.ftb.FtbPlugin
        at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:433)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:347)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:323)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:165)
        ... 6 more
Caused by: java.lang.IllegalArgumentException
        at org.objectweb.asm.ClassReader.<init>(Unknown Source)
        at org.objectweb.asm.ClassReader.<init>(Unknown Source)
        at org.objectweb.asm.ClassReader.<init>(Unknown Source)
        at net.md_5.specialsource.RemapperPreprocessor.preprocess(RemapperPreprocessor.java:83)
        at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:389)
        ... 13 more
FtbPlugin.java:
Code:
package no.spillere.plugin.ftb;

import org.bukkit.plugin.java.JavaPlugin;

import no.spillere.plugin.ftb.listeners.*;

public class FtbPlugin extends JavaPlugin {

    public BlockListener BlockListener;
    public EntityListener EntityListener;


    public void onEnable() {
        try {
            BlockListener = new BlockListener(this);
            EntityListener = new EntityListener(this);
            getServer().getPluginManager().registerEvents(BlockListener, this);
            getServer().getPluginManager().registerEvents(EntityListener, this);
            System.out.println("Spillere.no: Pluginen startet!");

        } catch (Exception e){
            e.printStackTrace();
            System.out.println("Spillere.no: Kunne ikke starte pluginen.");
        }
    }
}
Config.yml:
Code:
name: Spillere.no
author: [HydroTekZ]
main: no.spillere.plugin.ftb.FtbPlugin
version: 1.0