Plugin Exporting Incorrectly?

Discussion in 'Plugin Development' started by Bossyfins, Jul 26, 2014.

?

How did You learn to code in java and Bukkit API?

  1. Youtube Channel <TheNewBoston, Pogostick29dev, etc>

    70.0%
  2. From a library/ internet

    60.0%
Multiple votes are allowed.
Thread Status:
Not open for further replies.
  1. Offline

    Bossyfins

    Hell Bukkit Forums,
    I am developing a plugin which does many commands(like essentials).

    I have learned a lot from you guys, and I am thankful :D

    I only have 1 problem now. When i run the plugin, i get this error:


    Code:java
    1. [02:17:02] [Server thread/ERROR]: Could not load 'plugins\NetworkManager.jar' in folder 'plugins'
    2. org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    3. at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:150) ~[spigot.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    4. at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [spigot.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    5. at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugins(CraftServer.java:355) [spigot.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    6. at org.bukkit.craftbukkit.v1_7_R3.CraftServer.<init>(CraftServer.java:317) [spigot.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    7. at net.minecraft.server.v1_7_R3.PlayerList.<init>(PlayerList.java:68) [spigot.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    8. at net.minecraft.server.v1_7_R3.DedicatedPlayerList.<init>(SourceFile:14) [spigot.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    9. at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.java:126) [spigot.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    10. at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:436) [spigot.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    11. at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [spigot.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks]
    12. Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml


    I have no idea, I checked multiple sources on where it goes etc, and it all checks out. Ill ppost the plugin.yml on this.

    HTML:
    name: NetworkManager
    version: 1.0
    author: bossyfins
    main: com.InfiniteMC.NetworkManager.Main
    commands:
      coder:
          description: Who coded this plugin
          usage: /coder
          permission: nm.coder
          permission-message: Sorry, we were unable to make your request! <Permissions Has Not Yet Been Granted>
      bc:
          description: Broadcasts to the server you are on.
          usage: /bc <message>
          permission: nm.bc
          permission-message: Sorry, we were unable to make your request! <Permissions Has Not Yet Been Granted>
      ban:
          description: Bans a player
          usage: /<ban> <player> <reason>
          permission: nm.ban
          permission-message: Sorry, we were unable to make your request! <Permissions Has Not Yet Been Granted>
      kick:
          description: Kicks a player
          usage: /<kick> <player> <reason>
          permission: nm.kick
          permission-message: Sorry, we were unable to make your request! <Permissions Has Not Yet Been Granted>
     
  2. Offline

    ZodiacTheories

    Bossyfins
    It is getName() :) not getName

    Player splayer = (Player) sender; line is red because you need to do that after you declare the sender variable :)
     
  3. Offline

    Bossyfins

    ZodiacTheories
    It is getName(), i have it setup as
    getName("bc")
    etc
     
  4. Offline

    ZodiacTheories

    Bossyfins

    Try if(cmd.getName().equalsIgnoreCase("bc")
     
  5. Offline

    LetsTalkTnTHere

    I don't think you can do: if (cmd.getName(String)) { }
    try:
    Code:java
    1. if(label.equalsIgnoreCase(String)) {
    2. //What the command will do
    3. }


    And make sure your classes for your commands implement CommandExecutor and
    eventually in your onEnable()
    Type:
    this.getCommand(String).setExecutor(new [CLASS_NAME]);
     
  6. Offline

    Bossyfins

  7. Offline

    Niknea

    Bossyfins Problem one, change the lines of codes to look like this:

    PHP:
    this.getCommand("kick").setExecutor(new Banthis);
    Problem two, you need to implement the unimplented method, aka the onCommand boolean method to make the command even work.
     
Thread Status:
Not open for further replies.

Share This Page