Problem with HumanEntity.openEnchantment(location, boolean)

Discussion in 'Spigot Plugin Development' started by Taersious, May 4, 2015.

  1. The help for this method was anything but helpful.

    Code (Text):

            HumanEntity ent = (HumanEntity)p;
            ent.openEnchanting(p.getLocation(), true);
    This code when activated does open the Enchant dialog, and players can drop items and lapis in the dialog. The problem is, nothing happens. The item is not enchanted, no options appear to pick from, and occasionally, the lapis disappears.

    Anyone have experience with this sort of issue?
  2. With the enchanting table, I'm pretty sure it actually needs the enchanting table block for it to function properly. Much like how furnaces do. You could trick the client into thinking it actually has an enchanting table tho :p