Solved Command help!

Discussion in 'Plugin Development' started by Retrosize, Apr 29, 2014.

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

    Retrosize

    FIXED
    I'm not quite sure if this is the right subforum and if it isn't I'm sorry and I'll request a move but if that's not the case then continue on.

    I've recently been working on a plugin but I'm having some trouble, the problem I get is that the System tells me my the command I did. For example, if I was to do '/heal' (A command I created on my plugin) it does the command perfectly but it shows "/heal" in white. This is quite annoying. Also, this doesn't only happen with this command but with several other ones.
    BTW: When I say 'System' I mean in game :p

    Code:
     if(cmd.getName().equalsIgnoreCase("heal")){
    Player player = (Player) sender;
                if(args.length==1){
                Player user = player.getServer().getPlayer(args[0]);
                if(user==null){
                        player.sendMessage(ChatColor.DARK_RED +"Invalid Player");
                        return true;}
                user.setHealth(20);}
                else{
                        player.sendMessage(ChatColor.DARK_RED+"/heal <player>");
                }
        }
    Thank you for your answer but I had already resolved it. The problem was that I didn't " return true; "

    Anyways, this thread can be locked :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
Thread Status:
Not open for further replies.

Share This Page