Discord Thread Help with rename

  • 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!

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.

skUnity Discord

Site Manager
Aug 5, 2023
12,755
0
0
The skUnity Discord
discord.gg
How can I make, that an item cannot be renamed into " ﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽ ﷽﷽﷽﷽" ? One solution is
code_language.skript:
command /rename [<text>]:
    permission message: No perms
    permission: rename.use
    trigger:
        if arg-1 is set:
            if arg-1 is alphanumeric:
                set held item's name to colored arg-1
but then they can't use color codes like &6, &a, etc.

Posted by: cupex_ from the skUnity Discord. View the thread on skUnity Discord here
 
if arg does not match "[a-zA-Z0-9& ]+":
Simply add the space character inside the [ ]
Btw you dont use , to separate

Posted by: mr_darth from the skUnity Discord.
 
Status
Not open for further replies.