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

GetPlayer inventory when they are mining

Discussion in 'Plugin Help' started by sdsd16, May 11, 2019.

  1. sdsd16

    sdsd16 Spider Jockey

    Messages:
    41
    GitHub:
    Danding1314
    $maxsize = $event->getPlayer()->getInventory()->getMaxStackSize();
    $size = $event->getPlayer()->getInventory()->getSize();
    if($size > $maxsize){
    $event->getPlayer()->addTitle("Full ! Clean you inventory!");
    $event->getPlayer()->getLevel()->addSound(new AnvilFallSound($event->getPlayer()->getLocation()));


    why the event doesn't work when people inventory is full and next they're mining
     
  2. sdsd16

    sdsd16 Spider Jockey

    Messages:
    41
    GitHub:
    Danding1314
     
  3. sdsd16

    sdsd16 Spider Jockey

    Messages:
    41
    GitHub:
    Danding1314
    i changed it. but it doesn't work still
     
  4. JORDAN SAUNDERS

    JORDAN SAUNDERS Silverfish

    Messages:
    19
    GitHub:
    brunswickyt
    Ok so you want the plugin to announce to the player that they need to clear their inventory? do you want it in a pop up message or chat message?
     
  5. Swourire

    Swourire Spider Jockey

    Messages:
    49
    GitHub:
    swourire
  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.