/tellraw

Discussion in 'Archived: Plugin Requests' started by nathnana2002, Jun 11, 2014.

  1. Offline

    nathnana2002

    Can someone make it so /tellraw messages are in color? (And also, if you could make it so the message has an automatic Prefix!) Also, if you could make it if it allows spaces without having to put _. Thank You!
     
  2. Offline

    DotDash

    An Example use of /tellraw :
    Code:
    /tellraw @a {text:"This is an example",color:red}
     
  3. Offline

    nathnana2002

    Would it be possible for someone to make this command more simple? If not, Thanks anyways.

    Also, you cant add multiple colors with that command. (If you can, please tell me :p)

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

    Onlineids

    nathnana2002 Its pretty simple as it is, you just can't be lazy
     
  5. Offline

    nathnana2002

    I know, fine, but is it possible to have more than 1 color?

    Also, if anyone knows of a plugin that does this, please tell me!

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

    Necrodoom

    I think you'd be better off looking for a private message/broadcast plugin rather than asking to modify the JSON attributes of the /tellraw command.
     
  7. Offline

    nathnana2002

    Do you know of a such plugin?
     
  8. Offline

    Necrodoom

    Essentials, or if not using it, a simple search for broadcast plugin would get you many.
     
  9. Offline

    Alster551

    timtower has a plugin that could do this.
     
  10. Online

    timtower Administrator Administrator Moderator

    I do?
     
    AdamQpzm and Garris0n like this.
  11. Offline

    Alster551

    timtower yes.myou gave me a link to one called TellM
     
  12. Online

    timtower Administrator Administrator Moderator

    Now I know what you are talking about ( get lost in all the plugins I make )
    nathnana2002 https://www.dropbox.com/s/rzl8pq8wzweoizd/TellM.jar
    Code:
    commands:
      TellM:
        usage: TellM <player> <message>
        permission: tellm.use
        permission-message: You dont have the permissions to use this
      TellMl:
        usage: TellMl <player> <message>
        permission: tellml.use
        permission-message: You dont have the permissions to use this
      TellMr:
        usage: TellMr
        permission: tellmr.use
        permission-message: You dont have the permissions to use this
      TellA:
        usage: TellA <message>
        permission: tella.use
        permission-message: You dont have the permissions to use this
    
    permissions:
      tellm.use:
        default: OP
      tellml.use:
        default: OP
      tellmr.use:
        default: OP
      tella.use:
        default: OP
     
    AdamQpzm and Alster551 like this.
  13. Offline

    Alster551

     
  14. Offline

    Relicum

    I have this entire plugin already 90% coded anybody wants to get it you can here the docs are there to the source is on Github. You can add multiple colors plus multiple click events with this.

    https://relicum.ci.cloudbees.com/job/JChatter/

    https://github.com/Relicum/jchatter/

    This is a dev's tool , it creates the JSON using NO NMS/Reflection or Packet manipulation, You need to add you own storage method as once you havbe created the JSON string just store it in a config file and use the build in sender, can send to a player, all players or a set of players. Also no perms are required eg if you include run commands it will only run it if they have the standard perms. But to receive the tellraw chat players don't need anything.

    Code:java
    1. JChat jChat = new JChat("[");
    2. jChat.color(RED)
    3. .style(BOLD)
    4. .then("ADMIN")
    5. .color(BLUE)
    6. .style.(UNDERLINE,ITALIC)
    7. .command("/say hello")
    8. .itemTooltip("&6The Display Name", Arrays.asList("&aFirst Lore Line ", "Second", "", "&bthird"))
    9. .then("]")
    10. .color(RED)
    11. .style(BOLD)
    12. .send("Relicum");


    That you send it to the Player Relicum.

    Code:java
    1. JChat jChat = new JChat("[");
    2. jChat.color(RED)
    3. .style(BOLD)
    4. .then("ADMIN")
    5. .color(BLUE)
    6. .style.(UNDERLINE,ITALIC)
    7. .command("/say hello")
    8. .itemTooltip("&6The Display Name", Arrays.asList("&aFirst Lore Line ", "Second", "", "&bthird"))
    9. .then("]")
    10. .color(RED)
    11. .style(BOLD)
    12. .toJSONString();


    Would produce the JSON string which looks like this,

    Code:
      {"text":"","extra":[{"text":"[","color":"red","bold":true},{"text":"ADMIN","color":"blue","underlined":true,"italic":true,
      "clickEvent":{"action":"run_command","value":"/say hello"},"hoverEvent":{"action":"show_item","value":"{id:1s,Count:1b,
      tag:{display:{Lore:[0:\"§aFirst Lore Line \",1:\"Second\",2:\" \",3:\"§bthird\",],Name:\"§6The Display Name\",},},Damage:0s,}"}},
      {"text":"]","color":"red","bold":true}]}
    You can save that to a config file if its used regally

    One last thing if you wonder how the RED for example works am using a static import of ChatColor.

    Basic screen shots from a plugin I use it in.

    [​IMG]

    [​IMG]

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

Share This Page