Solved Set Inventory Title or create Block from ItemStack

Discussion in 'Plugin Development' started by MightyOne, Nov 21, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    MightyOne

    Ho ho ho,
    When you place a e.g. dispenser ingame with an item that had a custom name also the dispenser's inventory title will be that name. Bukkit.createInventory() supports to choose a name for your inventory, too. Nevertheless I could not find out how to change an inventory's name afterward, especially the one of a dispenser.
    Any ideas? Or mabye on how to create a Block on basis of an ItemStack?
    Thx in advance
     
  2. Offline

    CraftCreeper6

    @MightyOne
    Not sure I quite understand your question.

    If you want to change the name of the inventory of a dispenser either set the dispensers name as the inventory name you would like or (if it works) dis#getinv()#setname()
     
  3. Offline

    timtower Administrator Administrator Moderator

    @MightyOne Think that you need to create a new inventory for that.
     
  4. Offline

    MightyOne

    @CraftCreeper6 @timtower ah ok this Dispeser class allows to set the name a dispenser. Even if it was confusing that I had to call update() again before it worked.
     
  5. Offline

    CraftCreeper6

  6. Offline

    MightyOne

Thread Status:
Not open for further replies.

Share This Page