Solved Looking for some help with this Error

Discussion in 'Plugin Help/Development/Requests' started by mcrazmouze, Nov 13, 2015.

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

    mcrazmouze

    my package name is: me.razmouze.keepitem.keepitem
    my class name is : keepitem

    I got my plugin.yml here

    Code:
    main: me.razmouze.keepitem.keepitem
    version: 1.8
    name: keepitem
    
    commands:
      HighLevelPleas:
        description: It's going to give you 1000 levels
    error:

    Code:
    [20:00:26 ERROR]: Could not load 'plugins\EasyPlug13.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: Cannot find main class `me.razmouze.ke
    epitem.keepitem'
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
    a:66) ~[minecraft.jar:git-Spigot-5f38d38-efd6cb0]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:131) ~[minecraft.jar:git-Spigot-5f38d38-efd6cb0]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:329) ~[minecraft.jar:git-Spigot-5f38d38-efd6cb0]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:251) [minecraft.jar:git-Spigot-5f38d38-efd6cb0]
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.ja
    va:292) [minecraft.jar:git-Spigot-5f38d38-efd6cb0]
            at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.jav
    a:198) [minecraft.jar:git-Spigot-5f38d38-efd6cb0]
            at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java
    :525) [minecraft.jar:git-Spigot-5f38d38-efd6cb0]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]
    Caused by: java.lang.ClassNotFoundException: me.razmouze.keepitem.keepitem
            at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.8.0_25]
            at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.8.0_25]
            at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_
    25]
            at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_25]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:101) ~[minecraft.jar:git-Spigot-5f38d38-efd6cb0]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:86) ~[minecraft.jar:git-Spigot-5f38d38-efd6cb0]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_25]
            at java.lang.Class.forName0(Native Method) ~[?:1.8.0_25]
            at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_25]
            at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.jav
    a:64) ~[minecraft.jar:git-Spigot-5f38d38-efd6cb0]
            ... 7 more
     
    Last edited by a moderator: Nov 13, 2015
  2. Online

    timtower Moderator Moderator

  3. Offline

    mcrazmouze

    It is you can see that.
     
  4. Online

    timtower Moderator Moderator

    Please post your main class
     
  5. Offline

    mcrazmouze

    Code:
    package me.razmouze.keepitem;
    
    import java.util.logging.Logger;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.PluginDescriptionFile;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class keepitem extends JavaPlugin {
        @Override
        public void onEnable() {
            PluginDescriptionFile pdfFile = getDescription();
            Logger logger = getLogger();
          
            logger.info(pdfFile.getName() + " has been Enabled" + " Made by" + (pdfFile.getMain()));
        }
        @Override
        public void onDisable() {
            PluginDescriptionFile pdfFile = getDescription();
            Logger logger = getLogger();
          
            logger.info(pdfFile.getName() + " has been Disabled" + " Made by" + (pdfFile.getMain()));
        }
      
        public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {      
          
            if (label.equalsIgnoreCase("HighLevelPleas")) {
            if (!(sender instanceof Player)) {
                sender.sendMessage("Pleas logon with your Minecraft account.");
                return false;
            }
          
            Player player = (Player) sender;
            player.giveExpLevels(1000);
    
            return true;
            }
            return false;
        }
    }
    bump

    If someone has any idea, it might not work but we can try :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 13, 2015
  6. Online

    timtower Moderator Moderator

    @mcrazmouze Please follow the java naming conventions, so a class name starts with a capital letter.
     
  7. Offline

    mcrazmouze

    And what
    And what about package?
     
  8. Online

    timtower Moderator Moderator

  9. Offline

    mcrazmouze

    @timtower Well then it still dosen't work

    @timtower can't you make like a tempplate?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
  10. Online

    timtower Moderator Moderator

    @mcrazmouze Template for what? Open up your plugin jar with winzip or something else, see if the class is even there.
     
  11. Offline

    mcrazmouze

    @timtower Wait a minute there is no class inside how do i fix that?
     
  12. Online

    timtower Moderator Moderator

    Well, that explains a lot.
    You probably aren't exporting it correctly.
     
  13. Offline

    mcrazmouze

  14. Online

    timtower Moderator Moderator

  15. Offline

    mcrazmouze

    @timtower i LOVE YOU! (Hug throw screen!)
     
  16. Online

    timtower Moderator Moderator

    @mcrazmouze Glad that I could help.
    Marked thread as solved.
     
Thread Status:
Not open for further replies.

Share This Page