Retrieve Chat Messages from Players with GSC
-
Is there currently anyway to retrieve chat messages from players using GSC? I had previously done this using Lua with
player::onnotify("say", function ....but I am currently unable to find a way to port this to GSC without any sort of extra plugin.
The idea is to take the message and execute some sort of command, much like the commands you often see in Minecraft (/kill player, /help, etc...). I had it working previously in Lua with a multitude of commands, so if somebody could help me port it to GSC, that would be awesome. Or if I could do it in another language, I am open to that as well.
Thank you!
-
init() { level thread chatListener(); } chatListener() { while (true) { level waittill("say", message, player); println(player.name + " said: " + message); } }
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login