Skip to content

Don't identify inventories by their names #26

@SpraxDev

Description

@SpraxDev

Checking event.getView().getTitle() to see whether your custom inventory is being used is unsafe, as renaming a chest in an anvil allows users to set their own inventory titles. The correct way to check if your custom inventory is involved with an event is by using custom holders, see here: https://docs.papermc.io/paper/dev/custom-inventory-holder

https://github.com/craftaro/FabledSkyBlock/blob/bc15c264d9a9c2fc7ab542deed854df305f83ee1/src/main/java/com/craftaro/skyblock/menus/admin/Generator.java#L203

Originally posted by @ThrowerWay in #14 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions