Skip to content
This repository has been archived by the owner on May 6, 2018. It is now read-only.

Skript "On Chat" event doesnt follow command "stop" #386

Open
MuelTheFox opened this issue Dec 7, 2017 · 1 comment
Open

Skript "On Chat" event doesnt follow command "stop" #386

MuelTheFox opened this issue Dec 7, 2017 · 1 comment

Comments

@MuelTheFox
Copy link

So I'm trying to write code using skript for this custom /nickname command, and what my problem is, is that im using an On Chat event, so when they type /nickname it asks them in chat "Say the colour you want your name to be". So they would say yellow or green in chat and once they say yellow or green console would change there nickname to that color but keep there regular in game name, my problem is after they say their color they are still able to say another color in chat and have it change again, and again, the event doesnt stop after they type the first color.

My code:

command /nickname:
	permission: tc.nickname.nickname
	permission message: &bYou do not have permission to execute this command.
	trigger:
		send "&bType the color you would like your name to be."
		send "&bType '&e/nicknamelist&b' to view the allowed and blacklisted colors."
on chat:
	cancel event
	if message is "green":
		send "&bYour name has been changed too '&2%player%&b'!"
		make console execute command "enickname %player% &2%player%"
		wait 1 tick
		stop
	if message is "white":
		send "&bYour name has been changed too '&f%player%&b'!"
		make console execute command "enickname %player% &f%player%"
		wait 1 tick
		stop
	if message is "yellow":
		send "&bYour name has been changed too '&e%player%&b'!"
		make console execute command "enickname %player% &e%player%"
		wait 1 tick
		stop

If you have any questions let me know!

@antoniojamore
Copy link

Hey there!

This version of Skript is unsupported and outdated. If you would like to join an awesome Skript community that has a forums and Discord chat, check out skunity.com they also have an updated database of Skript addons and documentation there too!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants