Trapped chests cannot be cast to DirectionalContainer

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • None
    • Affects Version/s: None

      Spigot-6c9b0a1-de5c261 (MC: 1.8.8)

      Trapped Chests cannot be cast to directional or directional containers.

      (This code will only throw an error for Trapped Chests but will work for normal chests and ender chests)

      Block block = event.getBlock();
      if (block.getType() == Material.CHEST || block.getType() == Material.TRAPPED_CHEST || block.getType() == Material.ENDER_CHEST)
      DirectionalContainer chest = (DirectionalContainer) block.getState().getData(); //error thrown here on trapped chests

            Assignee:
            Unassigned
            Reporter:
            SnowGears
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: