I'm learning java to create plugins. I've made a package, class etc. I've also made a plugin.yml file but the console says every time: plugin.yml file is invalid... here is my code: package me.TheAsher0001.Test; import java.util.logging.Logger; import org.bukkit.command.Command; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player; public class test { public final Logger logger = Logger.getLogger("Minecraft"); public static test plugin; public void onEnable(){ this.logger.info("Testplugin Enabled"); } public void onDisable(){ this.logger.info("Testplugin Disabled"); } public boolean onCommand(ConsoleCommandSender sender, Command cmd, String commandLabel, final String[] args ){ if(commandLabel.equalsIgnoreCase("test")){ Player player = (Player) sender; player.sendMessage("This works!!!"); } return false; } } and my plugin.yml name: TestPlugin main: me.TheAsher0001.Test.test version: 0.1 description: My First Plugin Commands: test: description: sends player a message that the plugin works
Did you use proper YAML formatting(use spaces instead of tabs)? Can you show us the stack trace? Also please pastebin it!
test.java file: http://pastebin.com/rhKze1KM plugin.yml file: http://pastebin.com/xRvF8dVC I've put the plugin.yml file in project file (not with the package)... i've loaded the craftbukkit file. I use tabs but that shouldn't be the problem cause eclipse does that automatically (i don't like programs like intellij)
Your plugin.yml file is invalid, it should be: http://hastebin.com/yipomaguho.avrasm Tutorial on how to format it: http://wiki.bukkit.org/Plugin_Tutorial#Creating_plugin.yml http://wiki.bukkit.org/Plugin_YAML
it gives this error: http://hastebin.com/evuxozozux.sm Im trying to learn it... that's why i ask this question... help or dont go hate ppl
Code (Text): [20:52:37 ERROR]: Could not load 'plugins\Test.jar' in folder 'plugins' org.bukkit.plugin.InvalidDescriptionException: commands are of wrong type Code (Text): [20:52:37 ERROR]: Could not load 'plugins\Test2.jar' in folder 'plugins' org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml he was using the from YAML format
The problem with commands is that there is missing a indent in the last line. So instead of http://hastebin.com/yipomaguho.avrasm use http://hastebin.com/texeciruzu.avrasm as plugin.yml
solved it... i typed: "public class text' but i had to be: "public class test extends JavaPlugin'....