Argument Help!

Discussion in 'Plugin Development' started by knightryder364, Jan 24, 2016.

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

    knightryder364

    i want it so when i type

    /playerlook <players name online> <msg>

    The player in the <players name online> arg gets the <msg> in the color gold.

    How would i do that?

    -knight
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline

    Gorbit99

    Cancel the event
    Send player the message using:
    with & color codes
    yourplayer.sendMessage(ChatColor.transferAlternateColorCodes("&") + msg);
    //I'm not completely certain on the transferAlternateColorCodes thingy
    with names:
    ChatColor color = ChatColor.White; //Spaceholder
    switch (inputColor) {
    case "gold":
    color = ChatColor.Gold;
    break;
    other colors...
    }
    yourplayer.sendMessage(color + msg);
     
Thread Status:
Not open for further replies.

Share This Page