Block arrows bouncing

Discussion in 'Plugin Development' started by Bernatixer, Sep 1, 2014.

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

    Bernatixer

    Hello, I'm developing a minigame, but when the player became spectator, he can block the arrows, I have tried to disable arrow bouncing and change gamemode of the player.
     
  2. Offline

    mine-care

    Bernatixer This has been asked in another thread, but nvm :)
    3 ways i can think of:
    1. NMS(i dont know how)
    2. listent on projectile hit event, check if what it hit is a player, and get its direction. Then launch it 1 block further with the direction and power it had so its like, when it hits a player, it "teleports" to the other side of the player and keeps on going.
    3. make spectators fly 20 blocks above players, also make spectators unable to go under a specific y or above a specific y and disable toggle fight so they fly all time.
    hope i helped.
     
  3. Code:java
    1. onProjectileHit(ProjectileHitEvent e)
    2. {
    3. e.setCancelled(true);
    4. }
    5.  

    Bernatixer Try this.
     
  4. Offline

    Bernatixer

    Thanks, I'm gona test it.
     
Thread Status:
Not open for further replies.

Share This Page