[SPIGOT-185] Arrows / Enderpearls going through vanished players Created: 11/Dec/14  Updated: 27/May/15  Resolved: 27/May/15

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Arno Hernou Assignee: Unassigned
Resolution: Won't Fix Votes: 1
Labels: None


 Description   

Dear spigot team,

Would be possible to let all projectiles go through vanished players? I have seen a lot of server owners / developer asking for a way to do it but without response except of some custom forks of craftbukkit / spigot which I don't really trust.

thanks in advance,
arnofrutos



 Comments   
Comment by md_5 [ 27/May/15 ]

Use Spigot API method mentioned. As vanishing is player->player not player->world we can't reliably add this

Comment by Joshua Küpper [ 12/Dec/14 ]

In this case an other method-signature is probably needed.

hidePlayer(Player player, Class<? extends Projectile>... entities)

If you just pass the player object, as usual nothing will change (important for backwards compatibility). But now you're able to pass extra classes of projectiles which won't collide with that entity anymore. (To clarify: Only if the owner of a projectile is the player which does not see the the player which would be hit by the projectile, the projectile won't collide. So this would fix your "hidePlayer is not general"-thing).

Another thing we would have to think about is ExperienceOrbs, cause AFAIK passing null to setTarget(Entity) from EXPOrbs won't interrupt them in their "rush" on you. So that's another aspect which would need attention.

@Brokkonaut:
I haven't but, as FearThe1337 stated cancelling all collusions of projectiles would be too general if the player is only hid by one player.

Comment by Brokkonaut [ 12/Dec/14 ]

Have you tried player.spigot().setCollidesWithEntites(false) ?

Comment by FearThe1337 [ 12/Dec/14 ]

Problem is, hidePlayer(Player) might hide a player from just 1 person or everyone.
It is not a function to make someone totally vanished (It was not designed like this), being vanished in this case sounds ambiguous.

Comment by Joshua Küpper [ 12/Dec/14 ]

@FearThe1337

It can be achieved this way, but I also really dislike gamemode 3 ... and ... tell me a case where you would want players beein' hitten from arrows or enderpearls if you previously hid them with ".hidePlayer(Player player)". I can think of none.

So ... in conclusion, I think this would be a nice enhancement.

Comment by FearThe1337 [ 12/Dec/14 ]

I'm kind of wondering if this could not be done by putting vanished players in gamemode 3.

Comment by Z750 [ 12/Dec/14 ]

I have a patch to do just this, not sure how well it'd fit within the project. Will wait for additional feedback.

Generated at Tue Dec 16 23:14:16 UTC 2025 using Jira 10.3.15#10030015-sha1:909cc43d292ca09e774c1a243d9819be3f2628cd.