chat packet

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
I've made this chatcomponent converter a while ago:
https://gist.github.com/Snow-Pyon/9c3695929ac3e0939240147767535689

Which basically converts a chatcomponent object into a readable text (with colors and all). If that helps you in some way.

P.S: By the way, @ChisleLP and @CrisisLP I remember you guys wanting a global error broadcaster a while ago, I couldn't do it at the moment but now I can. Here is it:
code_language.skript:
#This is just to make sure it wont crash the server
on command:

  if command command's main command is "skript":

    set {_arguments::*} to arguments split by " "

    if  {_arguments::1} is "reload":

      set {script-reloading} to true
      wait 1 second
      clear {script-reloading}

on packet event play_server_chat:

  {script-reloading} is set
 
  set {_message} to toReadableText("chatcomponent" pjson 0 of event-packet)

  if {_message} parsed as "%text%: %text% \(%text%.sk, line %number%: %text%'\)" is set:

    set {_receivers::*} to all ops and console
    remove player from {_receivers::*}

    send "<light red>Global Error<grey>: <reset>%{_message}%" to {_receivers::*}

Needs of TuSKe, MundoSK and the converter I linked above.
 
Last edited by a moderator:
  • Like
Reactions: KingAlterIV
Status
Not open for further replies.