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

how to get information about the subject in hand

Comments in 'Plugin Development' started by Dmitry, Oct 15, 2013.

  1. Dmitry
    Offline

    Dmitry New Member

    Joined:
    Oct 15, 2013
    Posts:
    2
    Minecraft User:
    dimokx87
    Hello!
    Sorry for my English))
    Tell me, please. As the API to retrieve information about the object in your hand when you touch another block?
  2. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    I think that it's possible, an example is WorldEdit :)
  3. InusualZ
    Offline

    InusualZ Active Member Plugin Developer

    Joined:
    Aug 23, 2013
    Posts:
    218
    Plugins:
    1
    Minecraft User:
    Inusu4lZ
    You can add a handler for the event player.block.touch, that event pass as argument $player object and the touched block. With the player object you can check wich item have in hand

    BTW: that's event it's trigged by placing or breaking a block
  4. Dmitry
    Offline

    Dmitry New Member

    Joined:
    Oct 15, 2013
    Posts:
    2
    Minecraft User:
    dimokx87
    Add a handler "player.block.touch". Get an array "data" and there is nothing associated with the touched block. What variable to use to get the id of the object which is in the hand?

Share This Page

Advertisement