Argument Help!

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

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


    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?

  2. Offline

    timtower Moderator Moderator

  3. Offline


    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;
    other colors...
    yourplayer.sendMessage(color + msg);
Thread Status:
Not open for further replies.

Share This Page