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.

AntiEZ - Stop your players from being toxic!

Discussion in 'Scripts' started by OOF, Aug 26, 2019.

  1. OOF

    OOF New Member

    Joined:
    Aug 15, 2019
    Messages:
    0
    Likes Received:
    0
  2. Ayham Alali

    Supporter Dev Programme

    Joined:
    Jan 25, 2017
    Messages:
    51
    Likes Received:
    13
    Medals:
    You can improve your code alot by using this example:

    Code (Text):
    1.  
    2. #! YAML EXAMPLE TO USE THE CODE BELOW: (plugins/AntiEZ/config.yml)
    3. #!
    4. #! <CODE>
    5. #!
    6. #! messages:
    7. #!   - "msg 1"
    8. #!   - "msg 2"
    9. #!   - "msg 3"
    10. #!
    11. #! </CODE>
    12. #!
    13.  
    14. options:
    15.     blockedWords: "Ez" or "GG EZ" or "EZ GG" or "E Z" or "easy" or "EZZY" #! You better use regex to block such stuff like (regex example): "\B(e+z+|e+(a|)+(s|z)+y+)\B"
    16.  
    17. on load:
    18.     set {AntiEz::config::messages::*} to yml list "messages" of file "plugins/AntiEZ/config.yml" #! SkUtilities
    19.  
    20. on chat:
    21.     #! You can use ur blockedWords option or use regex (better)
    22.     regex replace all "\B(e+z+|e+(a|)+(s|z)+y+)\B" with (random text out of {AntiEz::config::messages::*}) in message
    23.  
    EDIT:
    You can use https://regex101.com/ to test your regex examples
     
    #2 Ayham Alali, Aug 29, 2019
    Last edited: Aug 29, 2019

Share This Page

Loading...