1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Inventory size

Discussion in 'Development' started by LucGamesDE, May 24, 2017.

  1. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    If I try to change the inventory size of a chest with $inv->setSize(0); it doesn't remove the slots. But I can't put stuff in there. So the slot number is 0 but the graphics don't change
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    this may be a client sided issue, you can try setting these slots to something like red wool named "Inventory Locked"
     
    jasonwynn10 and [deleted] like this.
  3. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    I can't set the slots. As I said there are only graphical. And I have another question.

    How can I open a Hopper inventory to a player?
     
  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    well you may be unable to set it, you could send FAKE items there
    or you can set it to normal size and make sure all these slot with "slot locked" wool dont get moved anywhere by players
    i dont know i think it's same as opening a chest, you may have more luck with a new thread for a new question
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.