Skript

Skript

788k Downloads

Skript hex color options message

Closed this issue ยท 3 comments

commented

Skript/Server Version

2.11.2
MC 1.21.5

Bug Description

Options with hex parse correctly, but don't display

Expected Behavior

To print hex colored messages.

Steps to Reproduce

options:
	color: <#08B0D5>

command /test:
	trigger:
		message "{@color}test." to player

Errors or Screenshots

The message displayed will be <test.
This properly parses, but isn't working when called.

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
commented

This is expected behavior. # is a comment, so the option is just <. Single # hex codes are for within strings, where we know the # is not meant to be a comment. Outside of strings, like in the option, you still need to use 2 #.

commented

That was fixed to properly handle skript chat colors? TP did this fix.

Options causes the single # skript color parser to not work.

options:
    color: <#00ff00>

command /test:
    trigger:
        message "<#00ff00>test." to player #works
        message "{@color}test." to player #breaks

Both messages should work.

commented

No, TP isn't related to this. I made a change a while back so Skript would treat single # in quoted strings as # instead of as the start of a comment. Since the option isn't a string, that change doesn't affect it. You need to use <##rrggbb>