Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RemoveItem Problem

Comments in 'Plugin Development' started by Rexius, Jul 9, 2016.

  1. Rexius
    Offline

    Rexius New Member

    Joined:
    Jul 3, 2014
    Posts:
    26
    Anvil item changed the name, but not remove

    PHP:
    $player->getInventory()->removeItem(Item::get(276));
    Code does not work and not remove
    Help me :(
    Last edited: Jul 9, 2016
  2. EschieEsh
    Offline

    EschieEsh Active Member

    Joined:
    Jun 28, 2014
    Posts:
    69
    Minecraft User:
    Escherion
    Is $player instance of Player?
  3. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    $player->getInventory()->removeItem(Item::get(276, $meta, $count));
  4. Rexius
    Offline

    Rexius New Member

    Joined:
    Jul 3, 2014
    Posts:
    26
    I tried but not remove
    Yes

Share This Page

Advertisement