java - invalid plugin.yml bukkit plugin error -


hey did issue on multiple sites before posted , did correct, still error when try load plugin, says error not invalid plugin.yml, , gives bunch of code lines , stuff (i'm assuming code in bukkit files , whatnot, , yes plugin.yml saved in src folder not package, , when export export .jar, anyway here's plugin.yml file

name: prothome main: com.yahoo.m1kesanders.prothome.prothome  version: 1.0.0 description: simple /home plugin   commands:     sethome:     description: sets players home    home:     description: teleports player home 

and did use 4 spaces , no tab keys used 2 spaces after commands: , 2 after each command

and here's code plugin in eclipse in case need check name , not

package com.yahoo.m1kesanders.prothome;  import java.io.file; import java.io.filenotfoundexception; import java.io.ioexception; import org.bukkit.bukkit; import org.bukkit.location; import org.bukkit.world; import org.bukkit.plugin.java.javaplugin; import org.bukkit.command.command; import org.bukkit.command.commandsender; import org.bukkit.configuration.invalidconfigurationexception; import org.bukkit.configuration.file.yamlconfiguration; import org.bukkit.entity.player;  public class prothome extends javaplugin{      public static prothome plugin;      public file folder = plugin.getdatafolder();     public static file file = new file("homes.yml");     public static yamlconfiguration homes = new yamlconfiguration();      public void onenable(){          if(!folder.exists()){              folder.mkdir();         }          if(!file.exists()){              file.mkdir();         }          try {             homes.load(file);         } catch (filenotfoundexception e) {             // todo auto-generated catch block             e.printstacktrace();         } catch (ioexception e) {             // todo auto-generated catch block             e.printstacktrace();         } catch (invalidconfigurationexception e) {             // todo auto-generated catch block             e.printstacktrace();         }     }      public boolean oncommand(commandsender cmdsender, command cmd, player player) throws filenotfoundexception, ioexception, invalidconfigurationexception{          if(cmdsender.equals("sethome")){              prothome.homes.load(prothome.file);              homes.set(player.getname() + ".x", player.getlocation().getblockx());             homes.set(player.getname() + ".y", player.getlocation().getblocky());             homes.set(player.getname() + ".z", player.getlocation().getblockz());             homes.set(player.getname() + ".world", player.getworld().getname());              prothome.homes.save(prothome.file);         }          else if(cmdsender.equals("home")){              int x = (int) homes.get(player.getname() + ".x");             int y = (int) homes.get(player.getname() + ".y");             int z = (int) homes.get(player.getname() + ".z");              string world = (string) homes.get(player.getname() + ".world");              world realworld = bukkit.getserver().getworld(world);              location loc = new location(realworld,x,y,z);              player.teleport(loc);          }          return false;      }  } 

if guys can me out mean lot reading

part of problem capitalized d in description: when in bukkit example plugin.yml, keys lowercase.

try exporting lowercase d although may not problem, helps use proper coding grammar. bukkit knit picky it's yaml parser.

also, future reference, packagenames not have capital letters, classes.

your package com.yahoo.m1kesanders.prothome

most packages com.yahoo.m1kesanders.prothome

i cannot certain, recommended bukkit plugins follow general rule. not know how bukkit's class loader works, capitalized package name surely doesn't help.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -