skUtilities icon indicating copy to clipboard operation
skUtilities copied to clipboard

Sharpsk compatibility trouble

Open Guarmanda opened this issue 6 years ago • 0 comments

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}

Guarmanda avatar May 27 '18 17:05 Guarmanda