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

Command on itemheld

Comments in 'Plugin Development' started by JackboyPlay, Nov 8, 2015.

  1. JackboyPlay
    Offline

    JackboyPlay Active Member

    Joined:
    Apr 25, 2015
    Posts:
    507
    Minecraft User:
    JackboyPlay
    Hello i've made a Plugin and need help how i can make it if a player hold an izem in hand that a command will be executed?
    Like: hand: stone i have a stone in hand and if i have the stone in my hand the command / money will be executed as the player
  2. minebuilder0110
    Offline

    minebuilder0110 Notable Member

    Joined:
    Dec 8, 2014
    Posts:
    485
    Minecraft User:
    Apparitional
    Try looking at the source code of Inventory command plug in.
  3. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    PlayerItemHeldEvent and $this->getServer()->dispatchCommand()

Share This Page

Advertisement