Solved Plugin does not extend JavaPlugin

Discussion in 'Plugin Help/Development/Requests' started by TRIPL3_CATS, May 25, 2015.

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

    TRIPL3_CATS

    Here is the log:
    Log (open)

    [15:13:04] [Server thread/INFO]: Starting minecraft server version 1.8.3
    [15:13:04] [Server thread/INFO]: Loading properties
    [15:13:04] [Server thread/INFO]: Default game type: SURVIVAL
    [15:13:04] [Server thread/INFO]: Generating keypair
    [15:13:04] [Server thread/INFO]: Starting Minecraft server on *:25565
    [15:13:04] [Server thread/INFO]: Using default channel type
    [15:13:04] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-0a645a2 (MC: 1.8.3) (Implementing API version 1.8.3-R0.1-SNAPSHOT)
    [15:13:04] [Server thread/ERROR]: Could not load 'plugins\StaffChat.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: main class `me.tripl3cats.staffchat.Main' does not extend JavaPlugin
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:49) ~[craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:129) ~[craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:328) ~[craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    at org.bukkit.craftbukkit.v1_8_R2.CraftServer.loadPlugins(CraftServer.java:288) [craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    at org.bukkit.craftbukkit.v1_8_R2.CraftServer.<init>(CraftServer.java:250) [craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    at net.minecraft.server.v1_8_R2.PlayerList.<init>(PlayerList.java:69) [craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    at net.minecraft.server.v1_8_R2.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    at net.minecraft.server.v1_8_R2.DedicatedServer.init(DedicatedServer.java:180) [craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    at net.minecraft.server.v1_8_R2.MinecraftServer.run(MinecraftServer.java:501) [craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_45]
    Caused by: java.lang.ClassCastException: class me.tripl3cats.staffchat.Main
    at java.lang.Class.asSubclass(Unknown Source) ~[?:1.8.0_45]
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:47) ~[craftbukkit-1.8.3-R0.1-SNAPSHOT-latest.jar:git-Bukkit-0a645a2]
    ... 10 more
    [15:13:05] [Server thread/INFO]: Preparing level "world"
    [15:13:05] [Server thread/INFO]: Preparing start region for level 0 (Seed: 6239917207493104571)
    [15:13:06] [Server thread/INFO]: Preparing spawn area: 59%
    [15:13:06] [Server thread/INFO]: Preparing start region for level 1 (Seed: 6239917207493104571)
    [15:13:07] [Server thread/INFO]: Preparing spawn area: 83%
    [15:13:07] [Server thread/INFO]: Preparing start region for level 2 (Seed: 6239917207493104571)
    [15:13:07] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [15:13:07] [Server thread/INFO]: Done (2.691s)! For help, type "help" or "?"



    My main.java:
    Main.java (open)

    package me.tripl3cats.staffchat;

    import org.bukkit.plugin.java.JavaPlugin;

    public class Main extends JavaPlugin {

    public void onEnable() {
    getConfig().options().copyDefaults(true);
    saveConfig();
    getCommand("staffchat").setExecutor(new CommandListener(this));
    getServer().getPluginManager().registerEvents(new ChatListener(this), this);
    getServer().getPluginManager().registerEvents(new JoinListener(this), this);
    }

    }


    And my plugin.yml:
    plugin.yml (open)

    name: StaffChat
    author: TRIPL3_CATS
    version: 1.0
    main: me.tripl3cats.staffchat.Main

    commands:
    staffchat:
    usage: /<command>
    description: Toggles Staff Chat on/off.

    permissions:
    staffchat.use:
    usage: /<command>


    I need help asap! I spent around 5 hours on this plugin I don't want it to go to trash!
     
  2. Invisible

    nverdier

    @TRIPL3_CATS Are you sure that you have the most current version of the jar in your plugins folder? Try seeing where you're exporting it to and make sure that you're getting the correct version onto your server.
     
Thread Status:
Not open for further replies.

Share This Page