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

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

@MuelTheFox

Description

@MuelTheFox

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions