Solved Copy and paste messages

Discussion in 'Plugin Development' started by TopTobster5, May 11, 2014.

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

    TopTobster5

    Hi, is there a way to set it so messages I send the player via player.sendMessage() can be copied? Thanks in advance for any help.
     
  2. Offline

    BeastCraft3

    use §o infront of the link

    I think that would work. not 100% sure though

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  3. Offline

    xMrPoi

    The color code "o" is for italics. I don't see how this would relate to the asked question.

    As for your question, what exactly are you asking? You could store whatever you're sending to the player in a string and then use it later? I'd need more information
     
  4. Offline

    TopTobster5

    xMrPoi Basicly its a small plugin which tells the user the relative coordinates of a block. I got a feature request to allow the users to copy these coordinates to their clip board. I was wondering how I could do it.
     
  5. Offline

    PickNChew

    It is not posssible.
     
    TopTobster5 likes this.
  6. Offline

    xMrPoi

    TopTobster5 likes this.
  7. Offline

    TopTobster5

    Ok thanks.
     
  8. Offline

    Xyplo

    He's lying. It is possible. But you'll have to get the message and save it somewhere for a command to read a string from a config or something. Then you can set the players message
     
  9. Offline

    Plo124

    TopTobster5
    Its possible but its not simply copying to the clipboard.
    Using the new JSON Chat in 1.7 you can 'Suggest Command' when a user clicks on the chat message. Then the message you ask them to 'suggest' is then in their chat bar, in which they can select and copy it there.

    Only thing is the JSON Chat isnt supported in the bukkit API yet. Search up 'Bukkit Fanciful' on Google, and there is a good JSON Chat Lib.
     
  10. Offline

    Xyplo

    I swear it's possible. I've saved a message into a config before and I've read a message to display in game before...
     
  11. Offline

    Plo124

    Xyplo
    He wants the client/user to be able to copy the location (I think)
     
  12. Offline

    Xyplo

    It all depends on what he wants it to do. As he hasn't explained it in much detail.
     
  13. Offline

    Plo124

    Xyplo
    Explained it enough for me (I highlighted key words)
     
    CarPet likes this.
  14. Offline

    Xyplo

    I don't think you can copy text to a clipboard on a computer. It has NO link...
     
  15. Offline

    Plo124

    Xyplo
    Have you not heard of 'tellRaw' in 1.7?
    This is a really neit change because users can click in the chat and run commands and stuff.
    Have you seen in a 1.7+ survival world you get the achievement Taking Inventory and its broadcasted to all of minecraftia? Have you tried hitting T and mousing over the [Taking Inventory] in green? Thats JSON Chat.

    Now, using the JSON Chat feature, they can click on a message and if you set it so they can click on it, you can put text into their chat bar, which they can then copy.
     
  16. Offline

    xMrPoi

    People aren't understanding what he wants to do. He doesn't want them to click. He doesn't want it to put it in their chat. He wants it to copy to their clipboard which as far as I know isn't possible
     
    CarPet likes this.
  17. Offline

    TopTobster5

    Right, to help stop the argument/discussion: Thanks for all of your ideas but as xMrPoi said, I want people to be able to copy it straight from the chat. It is not a major feature, just thought it would be neat if it was possible. But it is not without using JSON chat features. I am new to JSON so I am not going to bother with its features for now but thank you anyway for the ideas. I'm sure they will come in use some time.
     
  18. Offline

    Plo124

    TopTobster5
    You dont need to write all the {"text":"Foo"} stuff, the Fanciful chat lib you jsut say stuff like color(ChatColor.RED).underline(true);
     
Thread Status:
Not open for further replies.

Share This Page