Plugin Help I really need some help

Discussion in 'Plugin Help/Development/Requests' started by DeathMonarch, Nov 23, 2014.

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

    DeathMonarch

    I've been coding for about a week, maybe less. When I reload my plugin to test it on my test server, it throws several exceptions:
    [08:48:33] [Server thread/ERROR]: Could not load 'plugins\Feed.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:152) ~[craftbukkit.jar:git-Spigot-1642]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [craftbukkit.jar:git-Spigot-1642]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:369) [craftbukkit.jar:git-Spigot-1642]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.reload(CraftServer.java:864) [craftbukkit.jar:git-Spigot-1642]
    at org.bukkit.Bukkit.reload(Bukkit.java:301) [craftbukkit.jar:git-Spigot-1642]
    at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) [craftbukkit.jar:git-Spigot-1642]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) [craftbukkit.jar:git-Spigot-1642]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:767) [craftbukkit.jar:git-Spigot-1642]
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchServerCommand(CraftServer.java:753) [craftbukkit.jar:git-Spigot-1642]
    at net.minecraft.server.v1_7_R4.DedicatedServer.aB(DedicatedServer.java:326) [craftbukkit.jar:git-Spigot-1642]
    at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:290) [craftbukkit.jar:git-Spigot-1642]
    at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [craftbukkit.jar:git-Spigot-1642]
    at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [craftbukkit.jar:git-Spigot-1642]
    at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Spigot-1642]
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
    ... 14 more
    [08:48:33] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
     
  2. Offline

    mrCookieSlime

    Moved to Plugin Help.

    DeathMonarch
    You forgot to create a plugin.yml
     
  3. Offline

    DeathMonarch

    I have a plugin.yml:
    name: YoutubePlugin
    version: 1.0
    main: me.DeathMonarch.O.YouTubePractice
    description: Test plugin
    commands:
    hurt:
    description: Hurts a player.

    And here's my code:
    package me.DeathMonarch.YoutubePractice;

    import java.util.logging.Logger;

    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.Server;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.java.JavaPlugin;

    public class O extends JavaPlugin implements Listener
    {
    Logger myPlugginLogger = Bukkit.getLogger();

    public void onEnable()
    {

    }

    public void onDisable()
    {

    }

    public boolean onCommand(CommandSender theSender, Command cmd, String commandLabel, String[] args)
    {
    if(theSender instanceof Server)
    {
    Player player = (Player) theSender;

    if(commandLabel.equalsIgnoreCase("hurt"))
    {
    if(Bukkit.getPlayer(args[0]) != null)
    {
    Player playerToHurt = Bukkit.getPlayer(args[0]);
    playerToHurt.damage(Double.parseDouble(args[1]));
    playerToHurt.sendMessage(ChatColor.RED + "You were hurt by " + player.getName());
    }
    else
    {
    player.sendMessage("cant find player" + args[0]);

    }

    }

    }
    return true;
    }
     
  4. Offline

    mrCookieSlime

    DeathMonarch
    Make sure to tag me otherwise I might not see your Post.

    Did you make sure that the plugin.yml is in your src folder and that it is exported as well?
    Try to open the File using a ZIP File Manager. Can you see a plugin.yml?
     
  5. Offline

    DeathMonarch

    @mrCookieSlimeok, yes it is in the source folder, under the me.DeathMonarch.YouTubePractice package, it is checked off whne exported as well. I will try using 7-Zip to open it if that's what you mean.
     
  6. Offline

    mrCookieSlime

    DeathMonarch
    It doesnt belong into the package. It needs to be in the src folder itself.
     
  7. Offline

    DeathMonarch

    Even if the package is also in the source folder?
     
  8. Offline

    mrCookieSlime

    DeathMonarch
    Yes, the package needs to be in the src folder as well.
    But the plugin.yml cannot be in a package.
     
  9. Offline

    DeathMonarch

    So like this:
    -YouTubePractice
    - *src
    -**plugin.yml
    -**me.Deathmonarch.YoutubePractice
    -***O.Java
    (* being how many folders it is inside of)
     
  10. Offline

    mrCookieSlime

    DeathMonarch likes this.
  11. Offline

    DeathMonarch

    Okay that worked, thank you so much. It's throwing a different exception but i'm sure i can figure it out. That honestly took me like 3 hours until i came to the forums, thanks again mrCookieSlime.
     
Thread Status:
Not open for further replies.

Share This Page