
package com.exphc.FreeTrade;

import java.util.logging.Logger;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.command.*;
import org.bukkit.entity.*;

public class FreeTrade extends JavaPlugin {
    Logger log = Logger.getLogger("Minecraft");

    public void onEnable() {
        log.info("FreeTrade enabled");
    }

    public void onDisable() {
        log.info("FreeTrade disabled");
    }

    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
        Player player;
        String wanted, giving;

        if (!cmd.getName().equalsIgnoreCase("want")) {
            return false;
        }

        // /want
        if (args.length == 0) {
            return showOutstanding(sender);
        }

        // /want help
        if (args[0].equalsIgnoreCase("help")) {
            return showHelp(sender);
        }
            
        if (sender instanceof Player) {
            player = (Player)sender;
        } else {
            // TODO: get player from name as first argument
            sender.sendMessage("this command can only be run by a player");
        }

        if (args.length < 2) {
            return false;
        }

        wanted = args[0];
        if (args[1].equalsIgnoreCase("for")) {
            giving = args[2];
        } else {
            giving = args[1];
        }

        sender.sendMessage("you want " + wanted + " for " + giving);

        return true;
    }

    public boolean showOutstanding(CommandSender sender) {
        sender.sendMessage("TODO: show open orders");

        return false;
    }

    public boolean showHelp(CommandSender sender) {
        sender.sendMessage("TODO: show help");
        // TODO: hook into built-in bukkit help? /help?

        return false;
    }
}



@@ -759,138 +759,8 @@
  %7D%0A%0A
-        // /want help%0A        if (args%5B0%5D.equalsIgnoreCase(%22help%22)) %7B%0A            return showHelp(sender);%0A        %7D%0A            %0A
     
@@ -1441,193 +1441,8 @@
 );%0A%0A
-        return false;%0A    %7D%0A%0A    public boolean showHelp(CommandSender sender) %7B%0A        sender.sendMessage(%22TODO: show help%22);%0A        // TODO: hook into built-in bukkit help? /help?%0A%0A
     

Remove /want help; already is invalid usage so shows default help