Collisions no longer removed for spectators
AmauryCarrade opened this issue · 7 comments
The collisions are no longer removed for spectators if the server is running Minecraft 1.9+ (tested with Minecraft 1.9.2, latest Spigot build).
I only seen this bug with animals, but I suppose the problem is the same with players—a potentially big issue because with Minecraft 1.9, players can push themselves so spectators would be able to push players on a cliff or similar.
Aha! The setCollidesWithEntities
method we use is deprecated. We should be using this instead: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/LivingEntity.html#setCollidable(boolean)
It happens in servers running 1.8 as well. And the spectator wouldn't be able to push players, but yes vice-versa
@pgmann 1.8.8 Spigot
Hmm, I can't seem to get the Reflection API to work... Can you test it please @AmauryCarrade?
player.setCollidable(collides); //works on spigot-api 1.9(.4)
Reflection.call(player.getClass(), player, "setCollidable", collides); //doesn't work