Enderpearl Packet

Discussion in 'Spigot Plugin Development' started by Irantwomiles, Jun 22, 2016.

  1. How do I allow enderpearls to go through players? I'm almost 100% sure there is a packet or something but I cant find anything anywhere. Any help will be appreciated.
     
  2. Hmm.. Well, that event isn't cancellable..
    Maybe you could spawn in an exact copy of the ender pearl (same shooter, etc) one block past the entity it collided with with the same velocity it had?
     
  3. void setCollidable(boolean collidable)
    Set if this entity will be subject to collisions other entities.
     
    • Informative Informative x 1
  4. How do I use that in an event? Not showing up
     
  5. Choco

    Moderator

    Unfortunately, false. That method is for LivingEntities. The setCollidable(boolean) method is to set whether LivingEntities are able to push each other around or not. EnderPearls are not LivingEntities, and are unable to push anything around compared to, for example, a Sheep being able to collide with a Player.
     
    • Informative Informative x 1
  6. yea i just saw that. :( any one have a clue how people do this?
     
  7. I had the same problem a year ago, but I solved it (and I deleted the code now, because I use spectator gm nowadays). I think you use the ProjectileEntityEvent and spawn a new enderpearl at the same location (move the player 3 blocks up before) and with the same velocity (and obviously, the same shooter). I also think you need to do something with PlayerTeleportEvent, but I don't remember what...


    Sent from my iPhone using Tapatalk