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

Solved How do you get the number of items in a stack

Discussion in 'Help' started by esh123cookie, Sep 26, 2021.

  1. esh123cookie

    esh123cookie Baby Zombie

    Messages:
    104
    GitHub:
    esh123cookie
    For example, if I want to limit the number of items in someone's hand how would I do that.

    What my goal is to basically have chests that can be right-clicked, but since chests stack I need to remove that for just this certain named item or make sure when people right-click that item it is only 1 item. How would I do this?
     
  2. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    https://github.com/pmmp/PocketMine-...32f909/src/pocketmine/item/Item.php#L562-L564
     
    Agent likes this.
  3. esh123cookie

    esh123cookie Baby Zombie

    Messages:
    104
    GitHub:
    esh123cookie
  4. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    No problem. Now put the prefix to Solved please :p
     
    NTT, Agent and Axon like this.
  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.