mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 04:17:44 +01:00
SPIGOT-6399, SPIGOT-7344: Clarify collidable behavior for player entities
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
parent
d34ae053c8
commit
6c75204dda
@ -17,6 +17,8 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.projectiles.ProjectileSource;
|
import org.bukkit.projectiles.ProjectileSource;
|
||||||
|
import org.bukkit.scoreboard.Scoreboard;
|
||||||
|
import org.bukkit.scoreboard.Team;
|
||||||
import org.bukkit.util.RayTraceResult;
|
import org.bukkit.util.RayTraceResult;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@ -561,6 +563,14 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
|||||||
* <p>
|
* <p>
|
||||||
* Exemptions to this rule can be managed with
|
* Exemptions to this rule can be managed with
|
||||||
* {@link #getCollidableExemptions()}
|
* {@link #getCollidableExemptions()}
|
||||||
|
* <p>
|
||||||
|
* Note that the client may predict the collision between itself and another
|
||||||
|
* entity, resulting in this flag not working for player collisions. This
|
||||||
|
* method should therefore only be used to set the collision status of
|
||||||
|
* non-player entities.
|
||||||
|
* <p>
|
||||||
|
* To control player collisions, use {@link Team.Option#COLLISION_RULE} in
|
||||||
|
* combination with a {@link Scoreboard} and a {@link Team}.
|
||||||
*
|
*
|
||||||
* @param collidable collision status
|
* @param collidable collision status
|
||||||
*/
|
*/
|
||||||
@ -575,6 +585,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
|||||||
* Please note that this method returns only the custom collidable state,
|
* Please note that this method returns only the custom collidable state,
|
||||||
* not whether the entity is non-collidable for other reasons such as being
|
* not whether the entity is non-collidable for other reasons such as being
|
||||||
* dead.
|
* dead.
|
||||||
|
* <p>
|
||||||
|
* Note that the client may predict the collision between itself and another
|
||||||
|
* entity, resulting in this flag not being accurate for player collisions.
|
||||||
|
* This method should therefore only be used to check the collision status
|
||||||
|
* of non-player entities.
|
||||||
|
* <p>
|
||||||
|
* To check the collision behavior for a player, use
|
||||||
|
* {@link Team.Option#COLLISION_RULE} in combination with a
|
||||||
|
* {@link Scoreboard} and a {@link Team}.
|
||||||
*
|
*
|
||||||
* @return collision status
|
* @return collision status
|
||||||
*/
|
*/
|
||||||
@ -592,6 +611,14 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
|||||||
* entity is in this set then it will still collide with it.
|
* entity is in this set then it will still collide with it.
|
||||||
* <p>
|
* <p>
|
||||||
* Note these exemptions are not (currently) persistent.
|
* Note these exemptions are not (currently) persistent.
|
||||||
|
* <p>
|
||||||
|
* Note that the client may predict the collision between itself and another
|
||||||
|
* entity, resulting in those exemptions not being accurate for player
|
||||||
|
* collisions. This method should therefore only be used to exempt
|
||||||
|
* non-player entities.
|
||||||
|
* <p>
|
||||||
|
* To exempt collisions for a player, use {@link Team.Option#COLLISION_RULE}
|
||||||
|
* in combination with a {@link Scoreboard} and a {@link Team}.
|
||||||
*
|
*
|
||||||
* @return the collidable exemption set
|
* @return the collidable exemption set
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user