1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Chat Essentials prefix Replacement

Discussion in 'Snippets' started by MeHow, Jun 25, 2018.

  1. MeHow

    MeHow Active Member

    Joined:
    Feb 6, 2017
    Messages:
    140
    Likes Received:
    13
    Hello guys, I know it's easy to do , but a lot of new skripters asking how to format and replace essentials prefix without canceling chat and broadcasting message.

    upload_2018-6-25_12-48-22.png

    Code (Skript):
    1. on chat:
    2.     event.setFormat(event.getFormat().replace("{friend}", "&etest"))

    Code (Skript):
    1. format: '{friend}&f {DISPLAYNAME}&7> &7{MESSAGE}.'
    skript , skript-mirror
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    i don't mean to sound rude here... but why not just change
    Code (Skript):
    1. format: '{friend}&f {DISPLAYNAME}&7> &7{MESSAGE}.'
    to
    Code (Skript):
    1. format: '&etest&f {DISPLAYNAME}&7> &7{MESSAGE}.'
    ?

    Seems a lot simpler than having to write a skript to change something that is part of a config file
     
  3. MeHow

    MeHow Active Member

    Joined:
    Feb 6, 2017
    Messages:
    140
    Likes Received:
    13
    I mean If you want to do [(reputation) 0] player> message
    You can't do for every player same thing .
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    ohhhhh i see what you are doing there, gotcha.... okay yeah that makes sense.
    i also feel rather than doing it with skript-mirror you could do it without add-ons and do:

    Code (Skript):
    1. on chat:
    2.     set the chat format to "[player]: [message]"
    And then within that put your variables or whatever you need to do there
     
    #4 ShaneBee, Jun 25, 2018
    Last edited: Jun 25, 2018
  5. MeHow

    MeHow Active Member

    Joined:
    Feb 6, 2017
    Messages:
    140
    Likes Received:
    13

Share This Page

Loading...