-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Add Hex Color Support #3098
Add Hex Color Support #3098
Conversation
Now formatted like "<#123456>"
Okay, so I removed the need to format it with "color/hex/c" so you can just write: It should be working better now, however it doesn't currently work in tooltips. Not sure if that is something on my end or with Skript/Components EDIT: Test failed, but it wasn't an issue with this PR. |
With that commit, tooltips are now properly colored and the linked issue has been fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I believe we had an issue by using bungee chat API internally in some Spigot versions that didn't ship with it, are you sure this works all the way down 1.9.4?
That will need tested, but I would assume so since EffActionBar uses it. The BungeeConverter class is also used in EffMessage without any sort of version check. EDIT: Made the change I mentioned above to the documentation and updated the check. |
Further testing will be done by users in the future betas, thanks for the contribution. |
stolen code fom my translator :omegaconcernPanda: |
@Thrasilias wat |
That was sarcasme. I use <#rrggbb> in my own java code :) |
Description
This is a remake of #3078, which I had to close because the conflicts had gotten too complicated for me to fix.
This PR adds hex color support to Skript through a new "color" tag. I have updated the documentation appropriately. Unlike #3078, the tag should work everywhere now. I had to make some changes to EffActionBar for colors to work properly there.
This is kind of outside of this PR, but Skript doesn't allow you to do:
send title "<RED>Hello %player%!"
"RED" must be in lowercase. I'm not sure if this is intentional or not though.
The cause is:
Skript/src/main/java/ch/njol/skript/util/Utils.java
Line 526 in 558e9c6
Target Minecraft Versions: 1.16+
Requirements: 1.16+
Related Issues: Fixes #3106