Skip to content

Bug: Can't change virtual inventory's name #1472

Description

@jaylawl

Skript dev37c
Spigot 1.12.1
Reproduction:

command /test:
    trigger:
    
        open chest inventory with 3 rows named "asd" to command sender
        
        wait 10 ticks
        send command sender's current inventory's name
        set command sender's current inventory's name to "test"
        
        wait 10 ticks
        send command sender's current inventory's name
        set command sender's current inventory's name to "rip"

The inventory's name seems to be impervious to having it's name changed. There are no parse nor console errors output.

I have made sure there are no interfering plugins.

Did try some other variations all to the same result:

set {_inv} to player's current inventory
set {_inv}'s name to "different name"
open {_inv} to player

/edit2:
After doing some research, this might not be too easy to achieve. What does work however is to create a clone of the inventory and set a new name to that. e.g. clone the contents to a new GUI with a new name.

To clarify:
AFAIK changing a virtual inventory's name doesn't work like e.g. changing an item's name would, unless you send a fake packet to the players viewing the inventory. Trying to change the name of an inventory at the very least should parse-error or become an alias to the creation of a clone of the affected inventory + a new name (or send a packet).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.priority: lowIssues that are not harmful to the experience but are related to useful changes or additions.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions