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

Making Bukkit.createInventory returning matching classes (interfaces)

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: