How to make it so that when an arrow hits a block it creates a block, such as a spider web

Discussion in 'Plugin Development' started by Yarcha, May 24, 2022.

Thread Status:
Not open for further replies.
  1. Offline

    Yarcha

    Hello.
    I am new to creating plugins, so I asked for help on the forum. The thing is, I tried everything I could, I could not make the arrow that flew out of the bow hit the block and in this place created a block.
    Looked through a lot of topics, but there are old options, and I need to use spigot 1.8.8.
    Can you please tell me.
     
  2. Offline

    KarimAKL

    @Yarcha I believe the ProjectileHitEvent is called when an arrow hits a block. However, the #getHitBlock() method was added in version 1.11, and the #getHitBlockFace() was added in 1.13.2, so you would probably have to get the block from the arrow's location (and maybe the direction as well).
     
  3. Offline

    Yarcha

    Version 1.8.8 does not have this. How to do it in my version.

    My version 1.8.8

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 25, 2022
  4. Offline

    KarimAKL

    I already answered that:
     
Thread Status:
Not open for further replies.

Share This Page