Skip to content

Create custom InventoryHolder class #13

Description

@mfnalex

Hello, I am the author of ChestSort (www.chestsort.de). I was asked to add support for your CustomEnderChest plugin here: mfnalex/ChestSort#80

As it seems, you use inventories with the player as holder. In ChestSort, I check if an inventory is sortable by checking different criteria. For example, if an inventory's holder is a player, but the inventory does not equal Player#getInventory(), it's most likely some GUI that should NOT be sorted.

So, I currently have no way to check whether an inventory belongs to a CustomEnderChest.

Suggestion: You create a subclass for InventoryHolder, e.g. called CustomEnderChestInventoryHolder, and use that as a holder instead of the player. That way I could just check if Inventory#getHolder#getClass#getName equals net.craftersland.customenderchests.CustomEnderChestInventoryHolder and it would work fine.

I would create a pull request myself but you don't use maven, so I would either convert the project myself or wait until you implement the custom class.

It would be nice if you could think about adding this :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions