Im having so much trouble making a YML here is mine name: Test version : 1.0 main : me.Kyle.Ducks.Ducks author: Kyle description: Nothing commands: Duck: usage: /Duck description: Test command! But it keeps saying its resource is out of sync? sorry here is it Code: name: Test version : 1.0 main : me.Kyle.Ducks.Ducks author: Kyle description: Nothing :P commands: Duck: usage: /Duck description: It gives a nice message :D
Code: description: Nothing :P And Code: description: It gives a nice message :D The Code: :D and :P , or specifically the extraneous colons in the file are likely causing a YAML malfunction.
Code: name: PluginName version: 1.0 author: YOU websiter: http://you.com/ main: right.here commands: first: description: lol. usage: /command permission: right.here.use
ah @ColonelHedgehog this doesnt work Code: name: Duck version: 1.0 author: Kyle main: me.kyle.Ducks.Ducks commands: Duck: description: lol usage: /command permission: Ducks.Duck
Oh, and another thing: The path to your "main" file. You can't have a package name be the same as a file name. I recommend you rename your main class "Main" or something. Took me a solid 2 hours to figure that out. Weird, I know.
@ColonelHedgehog it that right? Code: name: Duck version: 1.0 author: Kyle main: me.kyle.work.Ducks commands: Duck: description: lol usage: /command permission: Ducks.Duck
Spaces don't really matter, the problem here (per @ColonelHedgehog , I haven't heard of this) is the main class specification.
What's your main class's name, the package it is in (capitalization matters) and your current plugin.yml? Additionally, if you're getting an error, post it here.
@1Rogue My main class's name is Work and here it is Code: name: Duck version: 1.0 author: Kyle main: me.kyle.Work.Ducks commands: Duck: description: lol usage: /command permission: Ducks.Duck
@ColonelHedgehog Doesnt work Code: name: Duck version: 1.0 author: Kyle main: me.Kyle.Ducks.Work commands: Duck: description: lol usage: /command permission: Ducks.Duck
@ColonelHedgehog the resource is out of sync in plugin.yml Code: package me.Kyle.Work; import java.util.logging.Logger; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.plugin.java.JavaPlugin; public class Ducks extends JavaPlugin { // Initializing the logger public static final Logger log = Logger.getLogger("Minecraft"); public void onEnable(){ log.info(ChatColor.GREEN + "Plugin loaded sucessfully!"); // Pretty self explanatory - logs this ^ message } public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) { //if the type in /hi if(cmd.getName().equalsIgnoreCase("Duck")){ sender.sendMessage(ChatColor.LIGHT_PURPLE + " " + ChatColor.BOLD + "Ducks are Cool"); //sends a bold light purple message to the sender - message in this case is 'Hello there!' } return true; } } Code: name: Duck version: 1.0 author: Kyle main: me.Kyle.Ducks.Work commands: Duck: description: lol usage: /command
@quack123456 The main in the plugin.yml is used for find the main class of your plugin. Yu have to put this. main: me.Kyle.Work.Ducks If it still doesnt work, remove description and usage for test. Code: commands: ducks:
@caderape Code: name: Duck version: 1.0 author: Kyle main: me.Kyle.Ducks.Work commands: Duck: But where do i put the main in my code
@quack123456 Put this in your plugin.yml Code: name: Duck version: 1.0 author: Kyle main: me.Kyle.Work.Ducks commands: Duck: Edit: be care, you have 3 space for the command duck. I'm not sure if it's affect, but you should put 2 spaces everytime.
@quack123456 Click on the project in your workspace and press f5. I am assuming you mean Eclipse won't let you export because the plugin.yml isn't up to date,.