Solved Inventory - Enchanting GUI

Discussion in 'Plugin Development' started by 97WaterPolo, Oct 19, 2014.

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

    97WaterPolo

    [​IMG]

    Hello! So the above picture is the enchanting inventory. A couple questions though.

    1. Is there a way to make the enchants them selves, stuff on the right, show up without having a sword or such in it? Like if you have a gold ingot, something non-enchantable, is there a way to make the boxes show up. One way I am currently doing it is creating a book with the item information, but hopefully I can just get the enchants to show up.

    2. Is there also a way to modify the levels? In the picture they are 2,2,4. Is there a way to actually modify it, so it could be 5,10,99? Or is this not possible?

    Thanks for reading this, I kinda doubt either one of the following are possible, but I would like to know is it truly isn't.
     
  2. Offline

    Funergy

    97WaterPolo This all is possible with packets I think. but I don't know too how to do it. kinda interested.
     
  3. Offline

    97WaterPolo

    Bump. I would love to know if this is possible as this thread hath sunketh.
     
  4. Offline

    fireblast709

    97WaterPolo with some NMS work it is possible. You will need to extend ContainerEnchantTable, override some methods and create your own method for opening the inventory (as NMS only has it for their own enchantment table).
     
  5. Offline

    97WaterPolo

    fireblast709

    How would I overwrite the one by default? Or should I open the one I modified when they open an enchanting inventory.
     
  6. Offline

    fireblast709

    97WaterPolo well you could override the default BlockEnchantmentTable class, and override interact(...) (where, instead of invoking startEnchanting(), you would open your custom enchantment table.
     
  7. Offline

    97WaterPolo

    fireblast709
    would there be any errors if you have a different version of the client?
     
  8. Offline

    fireblast709

    97WaterPolo this is all server side. The client wouldn't know the difference.
     
  9. Offline

    97WaterPolo

    fireblast709
    Thanks! Figured out a way using the bukkit API!
     
  10. Offline

    fireblast709

  11. Offline

    97WaterPolo

Thread Status:
Not open for further replies.

Share This Page