Solved Can't use backslash(\,slash) in .sendMessage

Discussion in 'Plugin Development' started by TNT_Tripper, Mar 23, 2015.

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

    TNT_Tripper

    I'm making my own Factions like plugin, I've made the claiming system, create faction command and leave, join, invite commands.

    Right now I'm making the /f map command but keep getting an error at
    player.sendMessage(ChatColor.GOLD+"\N/");

    i also can't use
    player.sendMessage("\");

    the original Factions plugin prints
    player.sendMessage(ChatColor.GOLD+"\N/");
    player.sendMessage(ChatColor.GOLD+"\N/");
     

    Attached Files:

  2. Offline

    TGRHavoc

    You need to escape it (Put a backslash in-front of your backslash)
     
  3. Offline

    TNT_Tripper

    Just like I bought one, Thanks man.

    player.sendMessage(ChatColor.GOLD+"\\N/");
     
  4. Offline

    nverdier

Thread Status:
Not open for further replies.

Share This Page