Checking if a chest is a double chest?

Discussion in 'Plugin Development' started by Debels, Jan 28, 2013.

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

    Debels

    How could I check if a chest is a double chest?, I know I can achieve this by checking if the inventory size equals 54, but is there a built in way of doing this?

    Thanks.
     
  2. Offline

    adam753

    I can think of a few simple ways, but as far as I know there's no "built-in" way since as far as Bukkit knows it's just a chest block.

    I guess you could write a boolean method to check for you.
     
  3. Offline

    Debels

    Then ill stick with:


    Code:
    if (chst.getInventory().getSize()==54){
    .....
    }

    and then checking where the other chest is.

    Thanks :)
     
  4. Offline

    the_merciless

    if (chst instanceof DoubleChest)
     
    skiithaw likes this.
Thread Status:
Not open for further replies.

Share This Page