Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7029

player.openEnchanting() not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Running on Windows 11 laptop with no other plugins installed.

    • CraftBukkit version 3493-Spigot-b081915-9d46b56 (MC: 1.18.2)
    • Yes

      I have the following code:

      public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
              
              Player player = (Player) sender;
              player.openEnchanting(null, true);
              
              return true;
              
          } 

      This is expected to open the enchanting table for the player that types the command (the command is /test in the test plugin, which I attached). However, it does not unless the player is standing directly on top of the enchanting table.

      I tried changing the first argument to "player.getLocation()" and the second argument to "false", but neither of these worked.

      There is a spigot thread (created by someone else) about this here: https://www.spigotmc.org/threads/openenchanting-method-does-nothing.559286/#post-4420911

            Unassigned Unassigned
            fishy_ydrib Fish Bird
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: