Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7259

Making Bukkit.createInventory returning matching classes (interfaces)

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • -
    • Yes

      Currently, Bukkit.createInventory(...) returns a CraftInventoryCustom. I think it would be better for it to return a class matching chosen InventoryType, Just like world.spawnEntity does.
      For example:
      ANVIL=> AnvilInventory
      CRAFTING => CraftingInventory
      ENCHANTING => EnchantingInventory

      This would give us access to more fuctions, like getRenameText in AnvilInventory, which we can only get by using CraftAnvilInventory.

            Unassigned Unassigned
            gotitim GotiM
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: