Plugin wont install

Discussion in 'Plugin Development' started by Techno, Jun 6, 2013.

Thread Status:
Not open for further replies.
  1. [quote uid=90788315 name="Burnett1" post=1702435]Upload the jar somewhere we can download please.[/quote]

    Okay, here is the new .jar download (Mediafire): <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 6, 2016
  2. Anyone else have any idea's of what I should do?
     
  3. Offline

    Burnett1

    Post your plugin.yml again
     
  4. It is in the .jar

    EDIT: I have'nt edited it since I posted the link to the .jar
     
  5. Offline

    Burnett1

    Code:
    name: Bill4788Package
    main: Bill4788Package.Bill4788_MainBukkitClass
    version: 1.0
    description: >
                My plugin.
    commands:
        alive:
          description: Testing Command
          usage: /<command> [player]
          permission: Bukkit_Plugin.Alive
          permission-message: You don't have Bukkit_Plugin.Alive
     

  6. Thank you. I have done that now and exported it to my testing server but it is still not working.
     
  7. Offline

    sheigutn

    What does it say if you execute the command? Nothing or command not found?
     
  8. It says Command Not Found
     
  9. Offline

    nmacholl

    In the server, when you run the plugins command, does your plugin show up?
    Make sure your .jar is located in the plugins folder and not some other folder. That happened to me once.
     

  10. No. It says "Unknown command. Type "help" for help"
     
  11. Offline

    nmacholl

    Do you have craftbukkit installed? plugins is a built in command for bukkit.
     

  12. Yes.
     
  13. Offline

    Minnymin3

    [quote uid=90798744 name="Techno" post=1702613]Okay, here is the new .jar download (Mediafire): <Edit by Moderator: Redacted mediafire url>

    Well theres your problem! Its a zip file. Bukkit doesnt load zip files. Make it a jar file and itl work.
     
    Last edited by a moderator: Nov 6, 2016

  14. I'm not quite sure how to do that.
     
  15. Offline

    Minnymin3

    rename it plugin.jar instead of plugin.zip
     

  16. Thanks. I acually figured it out and was about to edit that post. Lol.
     
  17. Offline

    devilquak

    I'm not quite sure how you do that... how are you creating the plugin as a zip file in the first place?
     
  18. Thank you everyone for your help. It now work's.

    Also. New problem:
    When I type /alive it print's it to the console. Any help?
    I want to print it to the user.
     
  19. Offline

    Minnymin3

    Bukkit.broadcastMessage("This is the message");
     
  20. Offline

    PatoTheBest

    That will print it to the whole server, just do
    Code:java
    1. sender.sendMessage("Message Here");

    To send it to the player that executed the command.
     
  21. Offline

    TheTrixsta

    Heres your plugin.yml
    https://dl.dropboxusercontent.com/u/28230696/plugin.yml

    and heres is the class file :)
    Code:
    package BukkitPlugin;
     
    import java.util.logging.Logger;
     
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class bukkitPlugin_Main extends JavaPlugin implements Listener {
        Logger log = Logger.getLogger("Minecraft");
     
        @Override
        public void onEnable() {
            getServer().getPluginManager().registerEvents(this, this);
            log.info("Bukkit: I AM ALIVE!");
        }
     
        @Override
        public void onDisable() {
            log.info("Bukkit: I AM DEAD!");
        }
     
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
            if(label.equalsIgnoreCase("alive")) {
                log.info("Bukkit: Hello!");
                sender.sendMessage("Bukkit:Hello!"); //This will send the message to whoever executed the command!
                return true;
            }
            return false;
        }
    }
    This should work fine for you, if not check the plugin.yml and make sure you pointed to the main class the correct way!

    Edit: While checking the if the command supplied is equal to something just check it against the label, not cmd.getName();

    Edit: Just saw where he already solved his problem, lol oh well!
     
  22. Well. Thank you for replying :)

    Here is another problem

    Code:
     
    [SEVERE] Could not load 'plugins\BukkitPlugin.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.ClassNotFoundException: Bill4788Package.Bill4788_MainBukkitClass
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.loadPlugins(CraftServer.java:239)
    at org.bukkit.craftbukkit.v1_5_R3.CraftServer.<init>(CraftServer.java:217)
    at net.minecraft.server.v1_5_R3.PlayerList.<init>(PlayerList.java:55)
    at net.minecraft.server.v1_5_R3.DedicatedPlayerList.<init>(SourceFile:11)
    at net.minecraft.server.v1_5_R3.DedicatedServer.init(DedicatedServer.java:106)
    at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:382)
    at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
    Caused by: java.lang.ClassNotFoundException: Bill4788Package.Bill4788_MainBukkitClass
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53)
    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:173)
    ... 9 more
     
    
    Um.. Any help?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  23. Offline

    the_merciless

    Caused by: java.lang.ClassNotFoundException: Bill4788Package.Bill4788_MainBukkitClass

    Did you copy and paste the code above your last post. Check your class name and package name in both your class and your plugin.yml
     
  24. [quote uid=106996 name="the_merciless" post=1711550]Caused by: java.lang.ClassNotFoundException: Bill4788Package.Bill4788_MainBukkitClass

    Did you copy and paste the code above your last post. Check your class name and package name in both your class and your plugin.yml[/quote]


    Code:
    name: Bill4788Package
    main: Bill4788Package.Bill4788_MainBukkitClass
    
    EDIT: Here is a download link for the .jar:
    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 6, 2016
  25. Offline

    the_merciless

    There is no classes in the jar. Make sure you include the classes when you export it
     

  26. Thank you very much! Problem solved.
     
Thread Status:
Not open for further replies.

Share This Page