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

Trapped chests cannot be cast to DirectionalContainer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • 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

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

              Created:
              Updated:
              Resolved: