Solved Cannot find main class error

Discussion in 'Spigot Plugin Help' started by GekkeStef, May 23, 2016.

  1. Hello fellow developers,
    I'm just getting errors (I'm new!)
    Sooo.. can anyone help me here is the code: ( its the log file)
    Code (Text):
    [16:49:07] [Server thread/INFO]: Starting minecraft server version 1.8
    [16:49:07] [Server thread/INFO]: Loading properties
    [16:49:07] [Server thread/INFO]: Default game type: CREATIVE
    [16:49:07] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-550ebac-7019900 (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)
    [16:49:07] [Server thread/INFO]: Debug logging is disabled
    [16:49:07] [Server thread/INFO]: Server Ping Player Sample Count: 12
    [16:49:07] [Server thread/INFO]: Using 4 threads for Netty based IO
    [16:49:07] [Server thread/INFO]: Generating keypair
    [16:49:07] [Server thread/INFO]: Starting Minecraft server on *:25565
    [16:49:07] [Server thread/INFO]: Set PluginClassLoader as parallel capable
    [16:49:07] [Server thread/ERROR]: Could not load 'plugins\MinetopiaPVP.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.GekkeStef.Mienka.MinetopiaPVP'
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:66) ~[spigot.jar:git-Spigot-550ebac-7019900]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[spigot.jar:git-Spigot-550ebac-7019900]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot.jar:git-Spigot-550ebac-7019900]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot.jar:git-Spigot-550ebac-7019900]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:291) [spigot.jar:git-Spigot-550ebac-7019900]
        at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:152) [spigot.jar:git-Spigot-550ebac-7019900]
        at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:505) [spigot.jar:git-Spigot-550ebac-7019900]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_91]
    Caused by: java.lang.ClassNotFoundException: me.GekkeStef.Mienka.MinetopiaPVP
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_91]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[spigot.jar:git-Spigot-550ebac-7019900]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[spigot.jar:git-Spigot-550ebac-7019900]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_91]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_91]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_91]
        at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_91]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[spigot.jar:git-Spigot-550ebac-7019900]
        ... 7 more
    [16:49:07] [Server thread/ERROR]: Could not load 'plugins\premium_1_70 (1).jar' in folder 'plugins'
    org.bukkit.plugin.UnknownDependencyException: Vault
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:219) [spigot.jar:git-Spigot-550ebac-7019900]
        at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:291) [spigot.jar:git-Spigot-550ebac-7019900]
        at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:152) [spigot.jar:git-Spigot-550ebac-7019900]
        at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:505) [spigot.jar:git-Spigot-550ebac-7019900]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_91]
    [16:49:07] [Server thread/INFO]: [Essentials] Loading Essentials vTeamCity
    [16:49:07] [Server thread/INFO]: [EssentialsSpawn] Loading EssentialsSpawn vTeamCity
    [16:49:07] [Server thread/INFO]: **** Beginning UUID conversion, this may take A LONG time ****
    [16:49:07] [Server thread/INFO]: Preparing level "world"
    [16:49:07] [Server thread/INFO]: -------- World Settings For [world] --------
    [16:49:07] [Server thread/INFO]: Item Despawn Rate: 6000
    [16:49:07] [Server thread/INFO]: Item Merge Radius: 2.5
    [16:49:07] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [16:49:07] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [16:49:07] [Server thread/INFO]: View Distance: 10
    [16:49:07] [Server thread/INFO]: Mob Spawn Range: 4
    [16:49:07] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [16:49:07] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [16:49:07] [Server thread/INFO]: Cane Growth Modifier: 100%
    [16:49:07] [Server thread/INFO]: Melon Growth Modifier: 100%
    [16:49:07] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [16:49:07] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [16:49:07] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [16:49:07] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [16:49:07] [Server thread/INFO]: Anti X-Ray: true
    [16:49:07] [Server thread/INFO]:     Engine Mode: 1
    [16:49:07] [Server thread/INFO]:     Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
    [16:49:07] [Server thread/INFO]:     Replace Blocks: [1, 5]
    [16:49:07] [Server thread/INFO]: Alternative Hopper Ticking: false
    [16:49:07] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [16:49:07] [Server thread/INFO]: Structure Info Saving: true
    [16:49:07] [Server thread/INFO]: Random Lighting Updates: false
    [16:49:07] [Server thread/INFO]: Sending up to 10 chunks per packet
    [16:49:07] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [16:49:07] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [16:49:07] [Server thread/INFO]: Max TNT Explosions: 100
    [16:49:07] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
    [16:49:07] [Server thread/INFO]: Chunks to Grow per Tick: 650
    [16:49:07] [Server thread/INFO]: Clear tick list: false
    [16:49:07] [Server thread/INFO]: Experience Merge Radius: 3.0
    [16:49:07] [Server thread/INFO]: Max Entity Collisions: 8
    [16:49:07] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [16:49:07] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [16:49:08] [Server thread/INFO]: -------- World Settings For [world_nether] --------
    [16:49:08] [Server thread/INFO]: Item Despawn Rate: 6000
    [16:49:08] [Server thread/INFO]: Item Merge Radius: 2.5
    [16:49:08] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [16:49:08] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [16:49:08] [Server thread/INFO]: View Distance: 10
    [16:49:08] [Server thread/INFO]: Mob Spawn Range: 4
    [16:49:08] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [16:49:08] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Cane Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Melon Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Anti X-Ray: true
    [16:49:08] [Server thread/INFO]:     Engine Mode: 1
    [16:49:08] [Server thread/INFO]:     Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
    [16:49:08] [Server thread/INFO]:     Replace Blocks: [1, 5]
    [16:49:08] [Server thread/INFO]: Alternative Hopper Ticking: false
    [16:49:08] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [16:49:08] [Server thread/INFO]: Structure Info Saving: true
    [16:49:08] [Server thread/INFO]: Random Lighting Updates: false
    [16:49:08] [Server thread/INFO]: Sending up to 10 chunks per packet
    [16:49:08] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [16:49:08] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [16:49:08] [Server thread/INFO]: Max TNT Explosions: 100
    [16:49:08] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
    [16:49:08] [Server thread/INFO]: Chunks to Grow per Tick: 650
    [16:49:08] [Server thread/INFO]: Clear tick list: false
    [16:49:08] [Server thread/INFO]: Experience Merge Radius: 3.0
    [16:49:08] [Server thread/INFO]: Max Entity Collisions: 8
    [16:49:08] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [16:49:08] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [16:49:08] [Server thread/INFO]: -------- World Settings For [world_the_end] --------
    [16:49:08] [Server thread/INFO]: Item Despawn Rate: 6000
    [16:49:08] [Server thread/INFO]: Item Merge Radius: 2.5
    [16:49:08] [Server thread/INFO]: Allow Zombie Pigmen to spawn from portal blocks: true
    [16:49:08] [Server thread/INFO]: Arrow Despawn Rate: 1200
    [16:49:08] [Server thread/INFO]: View Distance: 10
    [16:49:08] [Server thread/INFO]: Mob Spawn Range: 4
    [16:49:08] [Server thread/INFO]: Nerfing mobs spawned from spawners: false
    [16:49:08] [Server thread/INFO]: Cactus Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Cane Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Melon Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Mushroom Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Pumpkin Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Sapling Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Wheat Growth Modifier: 100%
    [16:49:08] [Server thread/INFO]: Anti X-Ray: true
    [16:49:08] [Server thread/INFO]:     Engine Mode: 1
    [16:49:08] [Server thread/INFO]:     Hidden Blocks: [14, 15, 16, 21, 48, 49, 54, 56, 73, 74, 82, 129, 130]
    [16:49:08] [Server thread/INFO]:     Replace Blocks: [1, 5]
    [16:49:08] [Server thread/INFO]: Alternative Hopper Ticking: false
    [16:49:08] [Server thread/INFO]: Hopper Transfer: 8 Hopper Check: 8 Hopper Amount: 1
    [16:49:08] [Server thread/INFO]: Structure Info Saving: true
    [16:49:08] [Server thread/INFO]: Random Lighting Updates: false
    [16:49:08] [Server thread/INFO]: Sending up to 10 chunks per packet
    [16:49:08] [Server thread/INFO]: Entity Activation Range: An 32 / Mo 32 / Mi 16
    [16:49:08] [Server thread/INFO]: Entity Tracking Range: Pl 48 / An 48 / Mo 48 / Mi 32 / Other 64
    [16:49:08] [Server thread/INFO]: Max TNT Explosions: 100
    [16:49:08] [Server thread/INFO]: Tile Max Tick Time: 50ms Entity max Tick Time: 50ms
    [16:49:08] [Server thread/INFO]: Chunks to Grow per Tick: 650
    [16:49:08] [Server thread/INFO]: Clear tick list: false
    [16:49:08] [Server thread/INFO]: Experience Merge Radius: 3.0
    [16:49:08] [Server thread/INFO]: Max Entity Collisions: 8
    [16:49:08] [Server thread/INFO]: Custom Map Seeds:  Village: 10387312 Feature: 14357617
    [16:49:08] [Server thread/INFO]: Zombie Aggressive Towards Villager: true
    [16:49:08] [Server thread/INFO]: Preparing start region for level 0 (Seed: 8714255893563333929)
    [16:49:08] [Server thread/INFO]: Preparing start region for level 1 (Seed: 8714255893563333929)
    [16:49:09] [Server thread/INFO]: Preparing start region for level 2 (Seed: 8714255893563333929)
    [16:49:09] [Server thread/INFO]: [Essentials] Enabling Essentials vTeamCity
    [16:49:09] [Server thread/INFO]: Bukkit version format changed. Version not checked.
    [16:49:09] [Server thread/INFO]: git-Spigot-550ebac-7019900 (MC: 1.8)
    [16:49:09] [Server thread/INFO]: 1.8-R0.1-SNAPSHOT
    [16:49:10] [Server thread/INFO]: Using locale en_US
    [16:49:10] [Server thread/INFO]: Using locale en_US
    [16:49:10] [Server thread/INFO]: Essentials: Using config file enhanced permissions.
    [16:49:10] [Server thread/INFO]: Permissions listed in as player-commands will be given to all users.
    [16:49:10] [Server thread/INFO]: [EssentialsSpawn] Enabling EssentialsSpawn vTeamCity
    [16:49:10] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [16:49:10] [Server thread/INFO]: Done (2.309s)! For help, type "help" or "?"
     
    And here is the code! of the main class

    Code (Text):
    package me.mienka.MinetopiaPVP;

    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.java.JavaPlugin;

    public class Mienka extends JavaPlugin{

        @Override
        public void onEnable() {
            getLogger().info("MinetopiaPVP werkt nu!");
            new PlayerListener(this);
        }

        @Override
        public void onDisable() {
       
        }

        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
       
            if (cmd.getName().equalsIgnoreCase("PVP") && sender instanceof Player) {
           
                Player player = (Player) sender;
           
                player.sendMessage("PVP berichten zijn aangezet!");
       
            }else if (cmd.getName().equalsIgnoreCase("PVPOFF") && sender instanceof Player) {
           
                Player player = (Player) sender;
           
                player.sendMessage("PVP berichten zijn uitgezet!");
           
                return true;
           
           
            }
       
            return false;
        }

    }
     
    Do you want to see my other classes to?
     
    #1 GekkeStef, May 23, 2016
    Last edited: May 23, 2016
  2. Some messages are dutch!
     
  3. Veranderen in je plugin.yml main me.GekkeStef.Mienka.MinetopiaPVP naar me.mienka.MinetopiaPVP.Mienka
     
  4. Ik zal het proberen <3
    Trouwens klopt dit zo: Player player = e.getPlayer();
     
  5. BTW Ik krijg steeds een error bij iets anders kan ik je anders ff spreken?
     
  6. Yes, my friend!
     
  7. Ja da is goed