Solved Inventory slot 6 stays null after being set!

Discussion in 'Plugin Development' started by _LB, Jul 17, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    _LB

    Code:java
    1. Inventory inv = Bukkit.createInventory(null, 9, "test inventory");
    2. ItemStack is = new ItemStack(Material.WOODEN_DOOR);
    3. inv.setItem(6, is);
    4. getLogger().info("######## slot 6 is null? "+(inv.getItem(6) == null));
    Code:
    [01:40:20 INFO]: [TestPlugin] Enabling TestPlugin v0.0.0-SNAPSHOT
    [01:40:20 INFO]: [TestPlugin] ######## slot 6 is null? true
    Entire plugin source: https://github.com/LB--/TestPlugin

    What in the world is happening here? Slots 0-5 work, why doesn't slot 6?? I'm using CB1.7.9-R0.2
     
  2. Offline

    Necrodoom

    You are looking for WOOD_DOOR.
    The one you are using is the block form, and MC blocks it from inventories.
     
    _LB likes this.
  3. Offline

    _LB

    Oh, why is there then WOODEN_DOOR and WOODEN_DOOR_BLOCK? That's really confusing.

    EDIT: D'oh, there is IRON_DOOR and IRON_DOOR_BLOCK but not WOODEN_DOOR_BLOCK.
     
Thread Status:
Not open for further replies.

Share This Page