Changing the xp level offers in PrepareItemEnchantEvent

Discussion in 'Plugin Development' started by Paxination, Jan 7, 2014.

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

    Paxination

    So I am trying to make a virtual Enchant table. I can get the screen to come up. But changing the levels per button doesnt work via view.setProperty(InventoryView.Property.ENCHANT_BUTTON1, 30);. So I read some where on here that you can use PrepareItemEnchantEvent. There is a method for obtaining an array of the integer values of the offers, but no way of setting it or modifing it.

    Even getExpLevelCostsOffered() doesnt offer anything after it to modify it.

    Any ideas on how to get around this?
     
  2. Offline

    RawCode

    public int[] getExpLevelCostsOffered() {
    return levelsOffered;
    }

    and what is your problem? edit array.
     
  3. Offline

    Paxination

     
  4. Offline

    RawCode

    what about getExpLevelCostsOffered()[0] = 999;

    this issue outside bukkit, you shoud read about java and OOP.
     
Thread Status:
Not open for further replies.

Share This Page