plugin.yml problem :(

Discussion in 'Plugin Development' started by MisterOpi, Jan 5, 2014.

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

    MisterOpi

    i gotta plugin.yml problem :(

    [​IMG]

    plugin.yml:
    Code:
    name: Opi's random plugin
    author: MisterOpi
    version: 1.0
    description: Opi's random plugin v1.0
    main: me.misteropi.plugins.opisrandomplugin
    commands:
      test:
        description: test
    If you can help, plz help :)
     
  2. Offline

    IkBenHarm

    MisterOpi
    it says it does not contain one. maybe you do not have it in the right place in your project foler.
    if your using eclipse:

    right-click the project foler then create new file plugin.yml

    if im right it should be at the right position right away
     
  3. Offline

    MisterOpi

    so... what was the error?

    E: still saying error
     
  4. Offline

    IkBenHarm

    MisterOpi
    I do not understand what you mean, but the server is saying you do not have a plugin.yml...
     
  5. Offline

    MisterOpi

    but i got it
     
  6. Offline

    Tster

    Screenshot your eclipse export window (the one where you select the files) - make sure you select plugin.yml and your code.
     
  7. Offline

    BillyGalbreath

    InvalidDescriptionException: Invalid plugin.yml

    Can't get any more clear then that. You have ' in your yml that should not be there.

    Code:
    name: Opis random plugin
    author: MisterOpi
    version: 1.0
    description: Opis random plugin v1.0
    main: me.misteropi.plugins.opisrandomplugin
    commands:
      test:
        description: test
    
    Any easy way to spot this is to use an online YAML parser to test your yml files syntax.

    More relevant information: http://forums.bukkit.org/threads/ho...ubleshoot-your-own-plugins-by-yourself.32457/
     
  8. Offline

    ShearsSheep

    Is the command /test ? If there is no Commands , your plugin.yml would be ,

    Code:
    name: <Name>
    version: <Your Version>
    main: me.<Etc etc>
    author: <Your name>
    description: <Info>
    Correct me if I am Wrong ,
    -ShearsPig
     
  9. Offline

    MisterOpi

    there is /test command

    i selected it but it still says error
     
  10. Offline

    ShearsSheep

    mhm.. Give me the code of your plugin :/ I'd wanna test it out!
     
  11. Offline

    MinePlayer64

    It says 'java.io.FileNotFoundException: Jar does not contain pluin.yml'.
     
  12. Offline

    RawCode

    post your jar already/
     
  13. Offline

    Sagacious_Zed Bukkit Docs

    If the server is giving you this message, it does not matter what you say, the server cannot find plugin.yml in the location that it expects to see it. There is no arguing with the computer, you must conform to what it expects.
     
  14. Offline

    MisterOpi

    download link:
    <Edit by Moderator: Redacted mediafire url>

    but still failing so i still got the problem :(
     
    Last edited by a moderator: Nov 4, 2016
  15. Offline

    Xephiro

    You have a problem in your plugin.yml

    Code:
    main: me.misteropi.plugins.opisrandomplugin
    This are incomplete

    The correct form are
    Code:
    main: me.misteropi.plugins.opisrandomplugin.OpisRandomPlugin
    With your plugin class at the end

    Other error is the name

    Code:
    name: Opi's random plugin
    You can not use '
    Code:
    name: Opis random plugin
     
  16. Offline

    Sagacious_Zed Bukkit Docs

    Xephiro You can have single quotes (') in yaml strings as long as they are escaped inside double quotes (").
     
  17. Offline

    Xephiro

    Sagacious_Zed

    Oh! thanks, i didn't know this
     
  18. Offline

    MisterOpi

    now it says error:
    Code:
    [22:05:16 ERROR]: Could not load 'plugins\orp.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.ClassNotFoundException: me.m
    isteropi.plugins.opisrandomplugin
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:184) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:308) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:231) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.ja
    va:255) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.bukkit.craftbukkit.v1_7_R1.CraftServer.<init>(CraftServer.java:23
    3) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at net.minecraft.server.v1_7_R1.PlayerList.<init>(PlayerList.java:63) [c
    raftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at net.minecraft.server.v1_7_R1.DedicatedPlayerList.<init>(SourceFile:14
    ) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.jav
    a:126) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
    :424) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
    17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
    Caused by: java.lang.ClassNotFoundException: me.misteropi.plugins.opisrandomplug
    in
            at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_45]
            at java.net.URLClassLoader$1.run(Unknown Source) ~[?:1.7.0_45]
            at java.security.AccessController.doPrivileged(Native Method) ~[?:1.7.0_
    45]
            at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.7.0_45]
            at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader
    .java:80) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
    java:53) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_45]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_45]
            at java.lang.Class.forName0(Native Method) ~[?:1.7.0_45]
            at java.lang.Class.forName(Unknown Source) ~[?:1.7.0_45]
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:173) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            ... 9 more
    new error?
    E1: can any1 help?


    Code:
    package me.misteropi.plugins.opisrandomplugin;
     
    import java.util.logging.Logger;
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.java.JavaPlugin;
     
     
    public class opisrandomplugin extends JavaPlugin {
        public final Logger logger = Logger.getLogger("Minecraft");
        public static opisrandomplugin plugin;
       
        @Override
        public void onDisable() {
            this.logger.info("orp v1.0 disabled");
        }
       
        @Override
        public void onEnable() {
            this.logger.info("orp v1.0 enabled");
        }
       
        public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
            Player player = (Player) sender;
            if(commandLabel.equalsIgnoreCase("test")){
                player.sendMessage(ChatColor.AQUA + "sent");
            }
            return false;
        }
    }
    
    im going to change /test and add /egg (throws egg) and /enderpearl (throws enderpearl)

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

    Xephiro

  20. Offline

    MisterOpi

    current plugin.yml:
    Code:
    main: me.misteropi.plugins.opisrandomplugin
    name: Opis random plugin
    version: 1.0
    author: MisterOpi
    description: v1b
    commands:
      test:
        description: test
     
  21. Offline

    Xephiro

    MisterOpi
    In main you need write your Main Class.

    You put only the package but not the Main Class

    change your plugin.yml to this:
    Code:
    main: me.misteropi.plugins.opisrandomplugin.opisrandomplugin
    name: Opis random plugin
    version: 1.0
    author: MisterOpi
    description: v1b
    commands:
      test:
        description: test
     
  22. Offline

    Wh1rledPeas

    These are all good observations, but I still think that he is failing to include the plugin.yml in the output of the jar. I am not familiar with Eclipse, but using IntelliJ IDEA, when you define your module's artifacts, you need to add the plugin.yml to the list of items which need to be included in the .jar as illustrated in this screen shot.

    Show Spoiler

    [​IMG]

    There is a good tutorial that explains how to set up your bukkit plugin project here...

    Bukkit Wiki: Setting Up Your Workspace
     
  23. Offline

    Mixerman123

    Make sure that...
    A) When you export your plugin, you are including plugin.yml. Do this by when you are exporting, finding the plugin.yml check box, and making sure it is checked.
    B) You might need to refresh your project/plugin.yml in eclipse. Do this by right clicking on your lugin.yml in Eclipse and pressing refresh, or F5. I know I had to do this on my old windows 7 laptop. Good luck.
     
  24. Offline

    MisterOpi

    OMG THX THX THX! thanks really alot u helped me!! :DDD :DD!!! :)))

    E: now im getting same problem whit plugin.yml. Code:
    Code:
    name: MisterEasyCommands
    main: me.misteropi.plugins.test.Main
    version: 1
    author: MisterOpi
    description: MisterEasyCommands
    commands:
        feed:
            description: Sets players food level to 20.
    Error:
    Code:
    [02:17:01 ERROR]: Could not load 'plugins\test.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
    inLoader.java:257) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:133) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.ja
    va:255) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.bukkit.craftbukkit.v1_7_R1.CraftServer.<init>(CraftServer.java:23
    3) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at net.minecraft.server.v1_7_R1.PlayerList.<init>(PlayerList.java:63) [c
    raftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at net.minecraft.server.v1_7_R1.DedicatedPlayerList.<init>(SourceFile:14
    ) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.jav
    a:126) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
    :424) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
    17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
    Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning for the n
    ext token; found character      '\t' that cannot start any token
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.ja
    va:358) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:17
    9) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingValue.produce(P
    arserImpl.java:591) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:161) ~
    [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:146)
    ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:133) ~
    [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java
    :237) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160) ~
    [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:12
    3) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:106)
    ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
    tructor.java:121) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:480) ~[craftbukkit.j
    ar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:411) ~[craftbukkit.jar:git-Buk
    kit-1.7.2-R0.2-b2974jnks]
            at org.bukkit.plugin.PluginDescriptionFile.<init>(PluginDescriptionFile.
    java:188) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
    inLoader.java:252) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-b2974jnks]
            ... 8 more
     
Thread Status:
Not open for further replies.

Share This Page