Colored Links

Discussion in 'Archived: Plugin Requests' started by laketri, Jul 17, 2013.

  1. Offline

    laketri

    Suggested name: ColorfulLinks

    What I want: I'd like a plugin that when any user pastes a link into chat, it would become a different color.

    Like if I were to say, "Hey guys, check out www.bukkit.org", www.bukkit.org would be whatever color it is made in the config.yml file, like blue, for example, but the rest of the message would still be white.

    This would help distinguish it from the rest of chat and more noticeable by players
    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: color.bypass - allow to bypass the color addition

    Picture example: bukkitpost.png
     
  2. Offline

    Scr3am

    I might be able to do this. Is there any time frame you'd like it to be done by?
     
  3. Offline

    laketri

    Whenever works for you. As soon as possible I guess
     
  4. Offline

    laketri

    any update?
     
  5. Offline

    darkness1999

    I could do this for you if you want to start every link with a certain letter: for example if you would start every link with "*" and at the end of the link "#"
    *www.bukkit.org#

    Would this be OK?
     
  6. Online

    timtower Administrator Administrator Moderator

    I have an suggestion, take it or leave it: Split the message at every spacebar, check every part if it starts with "http://" or "www." then color that part
     
  7. Offline

    darkness1999


    If you want to make this plugin then do it....
    I´m currently learning java and this is a bit to complicated for me so far...
    Thanks for the suggestion.
     
  8. Offline

    laketri

    I don't really want "*"'s or "#"'s, just colors
     
  9. Offline

    darkness1999

    Ok then you have to ask timtower.
     
  10. Offline

    Eikester

    there you go https://dl.dropboxusercontent.com/u/24414601/ColoredLinks.jar
    tell me if its ok how it is or if you need some changes.

    Commands:
    /coloredlinks set <color name>
    /coloredlinks reset
    or short 'cl'

    Permissions:
    ColoredLinks.set
    default: op

    Default Color is Aqua
    Color name can be one of the following (not case sensitive):

    Aqua
    Black
    Blue
    DarkAqua/Dark_Aqua
    DarkBlue/Dark_Blue
    DarkGray/Dark_Gray
    DarkGreen/Dark_Green
    Purple
    DarkPurple/Dark_Purple
    LightPurple/Light_Purple
    DarkRed/Dark_Red
    Gray
    Green
    Gold
    Red
    Yellow
    White
     
  11. Offline

    laketri

    Wow this is exactly what i was looking for. Only thing that I noticed is that if you don't add the www. or the http:// it won't recognize it as a link. Also, if you just do something like http://hello it will recognize it as a link, and you can't open it, which is more or less minecraft's fault. But when I say bukkit.org or forums.bukkit.org it doesn't recognize it.
     
  12. Offline

    xxMOxMOxx

    Minecraft can recognize links without the "www." or "http://" part, I wonder if theres anyway the developer can use that
     
  13. Offline

    Eikester

    yeah its not perfect and i guess i can change the link detection somehow, currently its just checking for "www." or "http://"
     
  14. Online

    timtower Administrator Administrator Moderator

    Checking such links is impossible, unless you put "http://" for every word that contains an dot, ping that link, then if you get an response then color it and put http:// in front of it so it becomes clickable
    Will cause loads of lag because of the pinging though
     
  15. Offline

    laketri

    I also noticed another problem. I use MineIRC and currently it's putting "§r" in front of every word in IRC chat.
    Here's an example, and I'm not sure why this would be happening
    Code:
    [15:37] <+EasECraft> IateBarrys: §rFucking §rgiant 
    [15:37] <+EasECraft> Laketri: §rshit 
    [15:37] <+EasECraft> IateBarrys: §rDumby 
    [15:37] <+EasECraft> Laketri: §ri §rkilled §rhim 
    [15:38] <+EasECraft> Laketri: §rwhere §rdid §rhe §rgo 
    [15:38] <+EasECraft> IateBarrys: §rHe §rwas §rkilling §rthe §rvillager 
    [15:38] <+EasECraft> Laketri: §rok 
    [15:39] <+EasECraft> Laketri: §rdont §rstart §rspawning §ret 
    [15:39] <+EasECraft> Laketri: §r2 §rvillagers 
    [15:40] <+EasECraft> Laketri: §r1 §rmore §rthen §rftb
    
     
  16. Offline

    laketri

    This is still a prominent problem. Really the only one that is currently bothering me.
     
  17. Online

    timtower Administrator Administrator Moderator

    According to the coding the color is reset at every word, that is causing the weird things
     

Share This Page