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

Give player arrow

Comments in 'Plugin Development' started by Tethered_, Jun 2, 2015.

  1. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    How can I give a player arrows? Since there doesn't seem to be an arrow item, I can't get the inventory and then use addItem(new Arrow).
  2. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    PHP:
    $player->getInventory()->addItem(Item::get(262$damage$amount);
    PEMapModder and Tethered_ like this.
  3. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    1. I can only give a player 1 arrow for some reason with (262, 0, 64)

    2. When shooting an arrow, it crashes the client. Has this been fixed in 0.11.0 or is there something else going on here?
  4. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    I don't know, I'm still using 0.11.0.
  5. Tethered_
    Offline

    Tethered_ Active Member Plugin Developer

    Joined:
    Jun 24, 2014
    Posts:
    178
    Plugins:
    2
    Minecraft User:
    Frostbyte58
    Once again, it was me. I was in creative mode and having trouble...
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Creative inventories are handled in some different way.

Share This Page

Advertisement