Solved Open level 30 enchanting table

Discussion in 'Plugin Development' started by Bammerbom, Sep 14, 2014.

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

    Bammerbom

    I found some topics about level 30 enchanting tables, but couldnt find an awnser.

    How to open an enchanting table with level 30?
     
  2. Offline

    mythbusterma

    Bammerbom

    You're probably going to have to be more specific than that.
     
  3. Offline

    Monkey_Swag

    mythbusterma pretty sure he wants to open an enchantment table inventory that supports level 30 enchantments.
     
    Bammerbom likes this.
  4. Offline

    Bammerbom

    Yes I want an enchantment table inventory where I can change the level of the buttons.

    BUMP.
     
  5. Offline

    GalaxyCraft

  6. Offline

    Bammerbom

    GalaxyCraft
    It is not possible to change the levels of the buttons with this method, how far I know...
     
  7. Offline

    4thegame3

    adventuretc and Bammerbom like this.
  8. Offline

    Bammerbom

    4thegame3
    I have this now, thanks for linking that event.
    Code:java
    1. @EventHandler
    2. public void onPreEnchantTest(PrepareItemEnchantEvent e){
    3. InventoryView view = e.getView();
    4. view.setProperty(Property.ENCHANT_BUTTON1, 1);
    5. view.setProperty(Property.ENCHANT_BUTTON2, 15);
    6. view.setProperty(Property.ENCHANT_BUTTON3, 30);
    7.  
    8. }

    But how do I update the view to the player, because this doesnt work.

    4thegame3
    Didnt saw your edit, thank you it worked!
    Code:
    Code:java
    1. @EventHandler
    2. public void onPreEnchantTest(PrepareItemEnchantEvent e){
    3. e.getExpLevelCostsOffered()[0] = 1;
    4. e.getExpLevelCostsOffered()[1] = 15;
    5. e.getExpLevelCostsOffered()[2] = 30;
    6. }


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  9. Offline

    4thegame3

    Bammerbom nice! thank you too for helping me on my other post! :D
     
Thread Status:
Not open for further replies.

Share This Page