Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharpsk compatibility trouble #47

Open
Guarmanda opened this issue May 27, 2018 · 0 comments
Open

Sharpsk compatibility trouble #47

Guarmanda opened this issue May 27, 2018 · 0 comments

Comments

@Guarmanda
Copy link

Guarmanda commented May 27, 2018

When doing /gamemode 1 using a skript command and skutilities to take the message from an yml file,
without sharpsk:
I do have a message that tells me "&6Gamemode set to &bCreative &6for player &bBlack_Eyes".
with sharpsk:
I don't have any message or console error, not any skutilities errors, just nothing, but the command still works :/

code:

command /gamemode [<text>] [<player>]:
	aliases: /gm
	trigger:
		set {_arg} to player
		arg 2 is set:
			set {_arg} to arg 2
		arg 1 is "1" or "creative":
			set gamemode of {_arg} to creative
		arg 1 is "2" or "adventure":
			set gamemode of {_arg} to adventure
		arg 1 is "3" or "spectator":
			set gamemode of {_arg} to spectator
		arg 1 is "0" or "survival":
			set gamemode of {_arg} to survival
		set {_message} to skutil yml value "Gamemode" from file "plugins/essentials/language.yml" parsed as text
		set {_message} to coloured {_message}
		replace all "[Gamemode]" with "%player's gamemode%" in {_message}
		replace all "[Player]" with "%{_arg}%" in {_message}
		arg 1 is not "1" or "creative" or "3" or "spectator" or "2" or "adventure" or "0" or "survival":
			set {_message} to Usage("/gamemode <gamemode> [<player>]")
		arg 1 is not set:
			set {_message} to Usage("/gamemode <gamemode> [<player>]")
		message coloured {_message}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant