- Jan 20, 2018
- 1,501
- 109
- 63
- 21
Skript Version: 2.2-dev36
Skript Author: Bensku
Minecraft Version: Spigot 1.12.2
---
Full Code:
Errors on Reload:
None
Other Useful Info:
So I'm trying to make a script that can read messages sent by the server (using the play_server_chat) packet. Most of it works, but for some weird reason whenever I'm sending a message using Skript, it doesn't work. I think this could be a bug. Example: (I do get the 'test' message in chat but it just sends me '<none>' in console)
But for some reason, whenever I use broadcast instead of message, it does work. Also when I use something like this code:
It does work. Does anyone know why this happens?
Addons using (including versions):
MundoSK 1.8.5 (and yes I have ProtocolLib)
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? Well I didn't really know any other methods of fixing it since I just want to edit this little bit of code and I don't want to change every script to set it's message to a local variable and send that instead of sending the message right away.
Skript Author: Bensku
Minecraft Version: Spigot 1.12.2
---
Full Code:
code_language.skript:
on packet event play_server_chat:
set {_t} to "chatcomponent" pjson 0 of event-packet
send "&ct: %{_t}%" to console
command /test:
trigger:
message "test"
Errors on Reload:
None
Other Useful Info:
So I'm trying to make a script that can read messages sent by the server (using the play_server_chat) packet. Most of it works, but for some weird reason whenever I'm sending a message using Skript, it doesn't work. I think this could be a bug. Example: (I do get the 'test' message in chat but it just sends me '<none>' in console)
Code:
[18:54:50 INFO]: <TPGamesNL> t
[18:54:50 INFO]: t: {"extra":[{"text":"<TPGamesNL> t"}],"text":""}
[18:54:52 INFO]: TPGamesNL issued server command: /test
[18:54:52 INFO]: TPGamesNL [ecf95bdd-5d30-4ddb-a3ec-f491f7cc1f34]: /test
[18:54:52 INFO]: t: <none>
code_language.skript:
on packet event play_server_chat:
set {_t} to "chatcomponent" pjson 0 of event-packet
send "&ct: %{_t}%" to console
command /test:
trigger:
set {_txt} to "test"
message {_txt}
Addons using (including versions):
MundoSK 1.8.5 (and yes I have ProtocolLib)
Troubleshooting:
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? Well I didn't really know any other methods of fixing it since I just want to edit this little bit of code and I don't want to change every script to set it's message to a local variable and send that instead of sending the message right away.