UltimateRename-0.3.sk

Created by Plebexer

Other available versions. Ordered by newest to oldest versions:

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

options:
#
#(!)GENERAL CONFIG:
#
#(!)OPTIONS
    #
    #(!)disable/enable blocked names
    block_names: true
    #
    #(!)disable/enable cooldown
    cooldown: true
    #
    #(!)change the default name colour
    default_name_colour: &7
    #
    #(!)disable/enable Player name in lore (to identify who created the item)
    #if a player renames an already renamed item, his name will appear below
    #of the name of the player that changed the name of the item first
    player_name_in_lore: true
    #
    #(!)change the default player name in lore colour
    player_name_in_lore_colour: &8
    #
    #(!)disable/enable the first title
    title1: true
    #
    #(!)disable/enable the second title
    title2: true
    #
    #(!)disable/enable the skript messages
    messages: true
    #
    #(!)disable/enable the skript sounds
    sounds: true
    #
    #(!)disable/enable the maximum item of one at once
    #only enable this if you want players to rename
    #whole stacks of items
    one_item_at_once: true
    #(!)disable/enable the warning message
    #to show to players after renaming an item
    send_warning_message: true
#
#(!)block items names and items here (Separate with commas) ", "
    blocked_names: &6&lUltimate &e&lItem, &5&lEpic &d&lBow, &c&lMaster Sword
#
#(!)Set the maximum of characters here:
    maximum_characters: 35
#
#(!)change cooldown here (5 seconds/5 minutes/5 hours/5 days)
    cooldown_time: 6 hours
#
#(!)change permissions here:
    default_permission: ur.default
    admin_permission: ur.admin
#
#(!)change success sound and the pitch and volume here (sound list:https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html)
    success_sound: BLOCK_NOTE_BLOCK_BIT
    #(!)this value has to be a number
    success_volume: 5
    #(!)this value has to be a number
    success_pitch: 2
#
#(!)change failure sound and the pitch and volume here (sound list:https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html)
    failure_sound: BLOCK_NOTE_BLOCK_BASS
    #(!)this value has to be a number
    failure_volume: 5
    #(!)this value has to be a number
    failure_pitch: 0.5
#
#(!)change messages here
    no_permission: &5&l[&d&lUR&5&l] &8>>> &7You don't have permission!
    cooldown_message: &5&l[&d&lUR&5&l] &8>>> &7You can only rename an item every &f%remaining time%.
    admin_success: &5&l[&d&lUR&5&l] &8>>> &7You changed the name of the item as an admin!
    blocked_item: &5&l[&d&lUR&5&l] &8>>> &7You can't change the name of the item to &7%coloured arg 1%
    success_message: &5&l[&d&lUR&5&l] &8>>> &7You changed the name of the item!
    insertname_message: &5&l[&d&lUR&5&l] &8>>> &7You have to insert a name
    holditem_message: &5&l[&d&lUR&5&l] &8>>> &7You need to be holding an item
    maximum_message: &5&l[&d&lUR&5&l] &8>>> &7The maximum of characters is &f35&7!
    one_item_at_once_message: &5&l[&d&lUR&5&l] &8>>> &7You can only rename &f1 &7item at once!
    warning_message: &5&l[&d&lUR&5&l] &8>>> &cWarning: using ranamed items to scam players will get you banned!
#
#(!)change titles and subtitles here
    success1_title: &a&lYou changed the
    success1_subtitle: &a&lname of the item
    success2_title: &c&lNow you have to
    success2_subtitle: &c&lwait 6 hours to rename again
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
# Skript Code Here
command /rename [<text>]:
    cooldown: {@cooldown_time}
    cooldown message: {@cooldown_message}
    trigger:
        player has permission "{@admin_permission}":
            set the name of player's held item to "{@default_name_colour}%coloured arg 1%"
            {@messages} = true:
                send "{@admin_success}"
            {@sounds} = true:
                play sound "{@success_sound}" with volume {@success_volume} and pitch {@success_pitch} to player
            cancel cooldown
            stop
        {@cooldown} = false:
            cancel cooldown
        player does not have permission "{@default_permission}":
            {@messages} = true:
                send "{@no_permission}" to player
            {@sounds} = true:
                play sound "{@failure_sound}" with volume {@failure_volume} and pitch {@failure_pitch} to player
            cancel cooldown
            stop
        player's held item is air:
            {@messages} = true:
                send "{@holditem_message}"
            {@sounds} = true:
                play sound "{@failure_sound}" with volume {@failure_volume} and pitch {@failure_pitch} to player
            cancel cooldown
            stop
        arg 1 is not set:
            {@messages} = true:
                send "{@insertname_message}"
            {@sounds} = true:
                play sound "{@failure_sound}" with volume {@failure_volume} and pitch {@failure_pitch} to player
            cancel cooldown
            stop
        length of coloured arg 1 is more than {@maximum_characters}:
            {@messages} = true:
                send "{@maximum_message}"
            {@sounds} = true:
                play sound "{@failure_sound}" with volume {@failure_volume} and pitch {@failure_pitch} to player
            cancel cooldown
            stop
        {@block_names} = true:
            set {list::names::*} to split "{@blocked_names}" at ", "
            loop {list::names::*}:
                coloured arg 1 = loop-value:
                    {@messages} = true:
                        send "{@blocked_item}"
                    {@sounds} = true:
                        play sound "{@failure_sound}" with volume {@failure_volume} and pitch {@failure_pitch} to player
                    cancel cooldown
                    exit trigger
        {@one_item_at_once} = true:
            item amount of player's tool > 1:
                {@messages} = true:
                    send "{@one_item_at_once_message}"
                {@sounds} = true:
                    play sound "{@failure_sound}" with volume {@failure_volume} and pitch {@failure_pitch} to player
                cancel cooldown
                stop
        {@title1} = true:
            send title "{@success1_title}" with subtitle "{@success1_subtitle}" to player for 4 seconds
        {@messages} = true:
            send "{@success_message}"
        {@sounds} = true:
            if {@title1} = true:
                play sound "{@success_sound}" with volume {@success_volume} and pitch {@success_pitch} to player
        set the name of player's held item to "{@default_name_colour}%coloured arg 1%"
        {@player_name_in_lore} = true:
            "%lore of player's held item%" doesn't contain "%player%":
                add "{@player_name_in_lore_colour}[%player%]" to lore of player's tool
        {@title1} = true:
            {@title2} = true:
                wait 3 seconds
        {@title2} = true:
            send title "{@success2_title}" with subtitle "{@success2_subtitle}" to player for 4 seconds
        {@sounds} = true:
            {@title2} = true:
                play sound "{@success_sound}" with volume {@success_volume} and pitch {@success_pitch} to player
        {@sounds} = true:
            {@title1} and {@title2} = false:
                play sound "{@success_sound}" with volume {@success_volume} and pitch {@success_pitch} to player
        {@send_warning_message} = true:
            wait 2 seconds
            send "{@warning_message}"
            play sound "{@success_sound}" with volume {@success_volume} and pitch {@success_pitch} to player
        stop

on script load:
    send "" to console
    send "&d&lUltimate Rename &7Loaded:" to console
    {@block_names} and {@cooldown} and {@player_name_in_lore} and {@title1} and {@title2} and {@messages} and {@sounds} and {@one_item_at_once} and {@send_warning_message} are true:
        send "  &5[&a>&5] &7The skript loaded without warnings." to console
        send "" to console
    {@block_names} is false:
        send "  &d&l[!] &cThe skript isn't blocking any item names." to console
        send "" to console
    {@cooldown} is false:
        send "  &d&l[!] &cThe cooldown is disabled." to console
        send "" to console
    {@player_name_in_lore} is false:
        send "  &d&l[!] &cPlayer names in lores is disabled, you wont be able to know who renamed the items." to console
        send "" to console
    {@title1} is false:
        send "  &d&l[!] &cTitle n°1 is disabled." to console
        send "" to console
    {@title2} is false:
        send "  &d&l[!] &cTitle n°2 is disabled." to console
        send "" to console
    {@messages} is false:
        send "  &d&l[!] &cMessages are disabled." to console
        send "" to console
    {@sounds} is false:
        send "  &d&l[!] &cSounds are disabled." to console
        send "" to console
    {@one_item_at_once} is false:
        send "  &d&l[!] &cOne item at once option is disabled, players will be able to name more than one item at once (not recommended)." to console
        send "" to console
    {@send_warning_message} is false:
        send "  &d&l[!] &cThe warning message is  disabled, your players wont receive any warnings! (not recommended)." to console
        send "" to console
    send "&5[&a>&5]&dVersion: &fVersion: &a0.2" to console
    send "&5[&a>&5]&dCreated by: &fPlebexer" to console
    send "" to console