Need plugin help, read inside.

Discussion in 'Plugin Development' started by Prophettt, May 19, 2014.

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

    Prophettt

    I have no idea how to word it so I wouldn't know how to look it up.

    I'm currenctly working on a small plugin just to troll with my friend on our private server, right now you can do a command (I can't say the actual command because of private reason), but I'll use test as an example.

    Code:
    /Test
    If they put a name after the test, a message pops up
    Code:
    if(args.length == 1){
    if(args[0].equalsIgnoreCase("TestName")){
     
    player.sendMessage(ChatColor.BOLD + "TestMessage");
    }
    It all works, but if you type

    Code:
    /test NonExistent Name
    Nothing will pop up in chat, how do I change it that it'll say "Sorry, that user is not yet in the list" ?

    Thanks in advance
     
  2. Offline

    Anonomoose

    Simples, just add an else statement after testing the args length, and send the message.
     
  3. Offline

    Prophettt

    Tried that already. If I than do "/test name" it'll the message up even if the name is spelled correctly.
     
Thread Status:
Not open for further replies.

Share This Page