[Help] Error when launching my plugin :/!

Discussion in 'Plugin Development' started by Roughbread, Feb 4, 2012.

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


    I have created(tried to) a plugin that changes the /say command.
    There are no errors in my code that the JDK is picking up, except for when I launch my bukkit server I get this error.
    I have tried changing my YAML around, but I still get this error :/ Please help!
  2. Offline


    Do you have the main in your plugin.yml pointing to the right class? It's case sensitive and has to be exact.
  3. Offline


    I do indeed :/
    Still isn't working

    package mark.plugins.say.SayMessage;
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.command.CommandSender;
    import org.bukkit.command.ConsoleCommandSender;
    import org.bukkit.command.defaults.VanillaCommand;
    public class Main extends VanillaCommand{
        public Main() {
            this.description = "Broadcasts the given message as the console";
            this.usageMessage = "/say <message>";
        public boolean execute(CommandSender sender, String currentAlias, String[] args) {
            if (!testPermission(sender)) return true;
            if (args.length == 0)  {
                sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage);
                return false;
            StringBuilder message = new StringBuilder();
            if (args.length > 0) {
                for (int i = 1; i < args.length; i++) {
                    message.append(" ");
            if (!(sender instanceof ConsoleCommandSender)) {
                Bukkit.getLogger().info("[" + sender.getName() + "] " + message);
                Bukkit.broadcastMessage(ChatColor.LIGHT_PURPLE + "[AusChaos] " + message);
                return true;
        public boolean matches(String input) {
            return input.startsWith("say ") || input.equalsIgnoreCase("say");
    Hopefully that might help you/or anyone find the error :/

    NOTE I have changed my package to 'mark.plugins.say.SayMessage' not 'mark.plugins.say' and have also done so in the YAML

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 23, 2016
  4. Offline


    Can you post your Main class as well? Seems like you might be trying to call something in there that's messing up
  5. This has saved me in many different circumstances. I don't know if this is your problem but try it anyways.


    Just copy and paste your YAML file into that.
Thread Status:
Not open for further replies.

Share This Page