Solved Hex color format changes when running Execute Command -SOLVED-

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

A_Tweeker

Member
Jan 25, 2024
1
0
1
44
--SOLVED-- Was just a random color plugin that was causing issues. removed it and updated essentials_chat and everything worked.

Hello skGods!
I am new here and am working on a skript that will allow players to change their prefix. It works perfectly fine until you try to add a Prefix with Hex Color Code Format. when I run this command: execute command "lp user %player% permission set prefix.70.%{tempprefix::%player%}%" the color format changes to the § style format. Here's the full .sk file:

code_language.skript:
command /newprefix:
  trigger:
    #NEED TO ADD:command to grab number of prefix tokens and check if amount is greater than 0
    set {editprefix::%player%} to "true"
    send "&9=================================================="
    send "&9=&6                   Set a custom Prefix               "
    send "&9=&6        Click the link below to make your prefix    "      
    send "&9=&6   <link:https://minecraft.menu/minecraft-rgb-generator>https://minecraft.menu/minecraft-rgb-generator "
    send "&9=&6           Then paste in chat and press enter        "
    send "&9=================================================="
on chat:
  if {editprefix::%player%} = "true":
    if message contains "cancel":
      cancel event
      send "&cAborting Prefix setup..."
      set {editprefix::%player%} to "false"
      stop trigger
    else:
      cancel event
      send "Your new Prefix will now be: &7[&r%message%&7]&r"
      set {tempprefix::%player%} to "&7[&r%message%&7]&r"
      send "Type in CONFIRM to accept your new prefix, CANCEL to exit"
      set {editprefix::%player%} to "false"
      set {confirmprefix::%player%} to "true"
  else:
    stop trigger
on chat:
  if {confirmprefix::%player%} = "true":
    if message contains "confirm":
      cancel event
      execute command "lp user %player% meta clear prefix"
      execute command "lp user %player% permission set prefix.70.%{tempprefix::%player%}%" # <--- command is reformating HEX color!
      set {confirmprefix::%player%} to "false"
      send "Your new Prefix is %{tempprefix::%player%}%"
    if message contains "cancel":
      cancel event
      send "&cAborting Prefix setup..."
      set {editprefix::%player%} to "false"
      set {confirmprefix::%player%} to "false"
      stop trigger
#NEED TO ADD:command to grab number of prefix tokens, subtract 1 and print remaining tokens
  else:
    stop trigger
 
Last edited: