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

Chest still open (animation) after inventory close

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • OS : Windows 10 x64

      JRE : 1.8_201

       

    • CraftBukkit version git-Spigot-1eece4f-1fa9a81 (MC: 1.14) (Implementing API version 1.14-R0.1-SNAPSHOT)
    • Yes

      Hi, i've encountered a potential bug when developing a plugin for MC 1.14

       

      When opening a chest inventory using

      player.openInventory(chest.getInventory());
      

      in a command for example, when you close the inventory the chest is still open (the animation of the chest, not the inventory GUI)

       

      A little video showing the problem in action:

      https://gyazo.com/bf804ffdbc61249db639de92d9191b7b

       

      I've tested the same exact code on 1.13.2 and the close animation is played correctly when closing the inventory.

       

      I've attached the little plugin i've made for showing the bug to this bug report.

      That's just the code in if you don't want to test it.

      public class ChestBug extends JavaPlugin
      {
          @Override
          public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
          {
              if (sender instanceof Player)
              {
                  Player player = (Player)sender;
                  Block block = player.getTargetBlock(null, 5);
                  BlockState state = block.getState();
                  if (state instanceof Chest)
                  {
                      player.openInventory(((Chest)state).getInventory());
                  }
              }
              return true;
          }
      }
      

       

      Thanks and sorry if this bug report is not correct.

            Unassigned Unassigned
            FrozenLegend FrozenLegend
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: