Solved How to rename an item in inventory "not holding it"

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

Status
Not open for further replies.

Fuenzy

Member
Nov 28, 2020
4
0
1
How do I rename an item in someone's inventory even if they aren't holding it?
It's as simple as it says.


every 4 seconds:
if {gamestatus} is true:
loop all players:
{speedrunner} is a player:
loop-player isn't {speedrunner}:
world of loop-player is world of {speedrunner}:
{speedrunner} is online:
loop-player is holding compass:
set name of loop-player's tool to "&3"
wait a tick
set name of loop-player's tool to "&cPing"
set the loop-player's compass target to location of {speedrunner}



every tick:
if {gamestatus} is true:
loop all players:
loop-player is not holding compass:
###here i want to rename any compass in inventory with "Compass"

Minecraft version 1.16.5
Skript: 2.5.3

Addons:
Skellet
skRayFall
SkStuff
 
Last edited:
please use [.CODE] and [./CODE] and paste your code between those, (Ofc remove the periods)

Code:
every 4 seconds:
    if {gamestatus} is true:
        loop all players:
            {speedrunner} is a player:
                loop-player isn't {speedrunner}:
                    world of loop-player is world of {speedrunner}:
                        {speedrunner} is online:
                            loop-player is holding compass:
                                set name of loop-player's held item to "&3"
                                wait 1 second
                                set name of loop-player's held item to "&cPing"
                                set loop-player's compass target to location of {speedrunner}



every 3 seconds in "world":
    if {gamestatus} is true:
        loop all players:
            loop loop-player's inventory:
                loop-player is not holding compass:
                    set name of loop-value-2 to "Compass"
 
Status
Not open for further replies.